mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
PHP Error removal when using CLI.
This commit is contained in:
parent
38cdc473fb
commit
0c8668ee51
@ -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 = explode("/", $http_path);
|
||||
@ -4479,6 +4482,11 @@ class e107
|
||||
$_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'];
|
||||
$_self = $this->HTTP_SCHEME.'://'.$_SERVER['HTTP_HOST'].$eSelf;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user