From 8d704fe5c0fb2de5e79fa31e95ca6d916e8cecae Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Tue, 20 Dec 2005 17:45:47 +0000 Subject: [PATCH] PHP5 fixes --- phpgwapi/inc/horde/config/registry.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {