mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
PHP Error removal when using CLI.
This commit is contained in:
@@ -4261,7 +4261,10 @@ class e107
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_SERVER['PHP_SELF'] == "") { $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME']; }
|
if ($_SERVER['PHP_SELF'] == "" && !empty($_SERVER['SCRIPT_NAME']))
|
||||||
|
{
|
||||||
|
$_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'];
|
||||||
|
}
|
||||||
|
|
||||||
$http_path = dirname($_SERVER['PHP_SELF']);
|
$http_path = dirname($_SERVER['PHP_SELF']);
|
||||||
$http_path = explode("/", $http_path);
|
$http_path = explode("/", $http_path);
|
||||||
@@ -4479,6 +4482,11 @@ class e107
|
|||||||
$_SERVER['PHP_SELF'] = $requestUrl;
|
$_SERVER['PHP_SELF'] = $requestUrl;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
if(self::isCli() && !empty($_SERVER['_']) && empty($_SERVER['SCRIPT_FILENAME']))
|
||||||
|
{
|
||||||
|
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['_'];
|
||||||
|
}
|
||||||
|
|
||||||
$eSelf = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'];
|
$eSelf = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'];
|
||||||
$_self = $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST'].$eSelf;
|
$_self = $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST'].$eSelf;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user