Fix the default value of ['server']['path'] when running from command line scripts

The logic in _sn_to_path() doesn't make sense when not running via a remote server.

Default to the empty string if running from the command line and ['server']['path']
is not set manually in config.php
This commit is contained in:
Francois Marier 2009-08-20 17:46:26 +12:00
parent d647483a27
commit 986d95b31e
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ if (isset($server)) {
if (isset($path)) {
$_path = $path;
} else {
$_path = array_key_exists('SCRIPT_NAME', $_SERVER) ?
$_path = (array_key_exists('SERVER_NAME', $_SERVER) && array_key_exists('SCRIPT_NAME', $_SERVER)) ?
_sn_to_path($_SERVER['SCRIPT_NAME']) :
null;
}