summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 3fc047af9..6c4b856e0 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -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;
}