diff --git a/html/includes/vars.inc.php b/html/includes/vars.inc.php index 591851f9f4..be0230fd9f 100644 --- a/html/includes/vars.inc.php +++ b/html/includes/vars.inc.php @@ -1,5 +1,7 @@ $get_var) { if (strstr($key, 'opt')) { list($name, $value) = explode('|', $get_var); @@ -11,9 +13,9 @@ foreach ($_GET as $key => $get_var) { } } -$base_url = parse_url($config["base_url"]); +$base_url = parse_url(Config::get('base_url')); // don't parse the subdirectory, if there is one in the path -if (strlen($base_url["path"]) > 1) { +if (isset($base_url['path']) && strlen($base_url['path']) > 1) { $segments = explode('/', trim(str_replace($base_url["path"], "", $_SERVER['REQUEST_URI']), '/')); } else { $segments = explode('/', trim($_SERVER['REQUEST_URI'], '/'));