From 3fef1a6eec25454df72607f6da26adad73b91993 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 15 Oct 2017 22:12:23 +0200 Subject: [PATCH] * fix for php versions under 5.5 where empty() function supported only variables --- index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index c3b87ed1..b6dbc7ce 100644 --- a/index.php +++ b/index.php @@ -42,13 +42,14 @@ if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['i require_once(SYSTEM . 'functions.php'); $uri = $_SERVER['REQUEST_URI']; -if(!empty(BASE_DIR)) + +$tmp = BASE_DIR; +if(!empty($tmp)) $uri = str_replace(BASE_DIR . '/', '', $uri); else $uri = str_replace_first('/', '', $uri); -$uri = str_replace(array('index.php/', '?'), '', $uri); -$uri = strtolower($uri); +$uri = strtolower(str_replace(array('index.php/', '?'), '', $uri)); $found = false; if(empty($uri) || isset($_REQUEST['template'])) {