diff --git a/phpgwapi/inc/horde/config/registry.php b/phpgwapi/inc/horde/config/registry.php index 52c47f903c..fae6c9c3b5 100644 --- a/phpgwapi/inc/horde/config/registry.php +++ b/phpgwapi/inc/horde/config/registry.php @@ -39,7 +39,8 @@ // variable uses forward slashes. If it does not, you'll have to tweak // this. if (isset($_SERVER['PHP_SELF'])) { - $webroot = strstr(dirname(__FILE__), '/' . array_shift(preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY))); + $parts = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY); + $webroot = strstr(dirname(__FILE__), '/' . array_shift($parts)); if ($webroot !== false) { $webroot = preg_replace(';/config$;', '', $webroot); } else {