summaryrefslogtreecommitdiff
path: root/inc/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/init.php')
-rw-r--r--inc/init.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/init.php b/inc/init.php
index a937b934d..7340f4191 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -411,7 +411,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']);
@@ -438,7 +438,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'])){