diff options
Diffstat (limited to 'inc/init.php')
-rw-r--r-- | inc/init.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/init.php b/inc/init.php index d0d9101e6..12bb6f588 100644 --- a/inc/init.php +++ b/inc/init.php @@ -429,7 +429,7 @@ function getBaseURL($abs=null){ //if canonical url enabled always return absolute if(is_null($abs)) $abs = $conf['canonical']; - if($conf['basedir']){ + if(!empty($conf['basedir'])){ $dir = $conf['basedir']; }elseif(substr($_SERVER['SCRIPT_NAME'],-4) == '.php'){ $dir = dirname($_SERVER['SCRIPT_NAME']); @@ -456,7 +456,7 @@ function getBaseURL($abs=null){ if(!$abs) return $dir; //use config option if available, trim any slash from end of baseurl to avoid multiple consecutive slashes in the path - if($conf['baseurl']) return rtrim($conf['baseurl'],'/').$dir; + if(!empty($conf['baseurl'])) return rtrim($conf['baseurl'],'/').$dir; //split hostheader into host and port if(isset($_SERVER['HTTP_HOST'])){ |