diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index 1386495..9be47c9 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -469,6 +469,8 @@ class KTInit { if(PEAR::isError($dbSetup)) { + /* We need to setup the language handler to display this error correctly */ + $this->setupI18n(); $this->handleInitError($dbSetup); } diff --git a/lib/util/ktutil.inc b/lib/util/ktutil.inc index 3377db2..41baa4b 100644 --- a/lib/util/ktutil.inc +++ b/lib/util/ktutil.inc @@ -91,8 +91,12 @@ class KTUtil { $cacheDir = $default->cacheDirectory; $base_url = @file_get_contents($cacheDir . '/' . KTUtil::SERVER_NAME_FILE); - - $default->log->debug("kt_url: base url - $base_url"); + + /* We are checking if the object exists because we could have an error pre oor during initialization */ + if(is_object($default->log)) + { + $default->log->debug("kt_url: base url - $base_url"); + } if (false !== $base_url) { @@ -104,8 +108,12 @@ class KTUtil { $rootUrl = $default->rootUrl; $base_url = ($default->sslEnabled ? 'https' : 'http') .'://'.$serverName . $rootUrl; - - $default->log->debug("kt_url: base url - $base_url"); + + if(is_object($default->log)) + { + $default->log->debug("kt_url: base url - $base_url"); + } + return $base_url;