Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Disable redirect for CLI

givanze3aa7e83165f
diff --git a/install/controller/base.php b/install/controller/base.php
index b36cf88..30e5e74 100755
--- a/install/controller/base.php
+++ b/install/controller/base.php
@@ -33,9 +33,13 @@ class Base {
}
function redirect($url = '/') {
- session_write_close();
+ if (defined('CLI')) {
+ return;
+ }
- return die(header("Location: $url"));
+ session_write_close();
+ header("Location: $url");
+ die();
}
function notFound($service = false, $message = null, $statusCode = 404) {