do not add dir separator to contentDir if it is empty

This commit is contained in:
Uwe Steinmann 2017-08-01 10:22:10 +02:00
parent 3697ab0da1
commit 1339c36d67

View File

@ -434,7 +434,7 @@ class Settings { /* {{{ */
$this->_rootDir = strval($tab["rootDir"]);
$this->_httpRoot = strval($tab["httpRoot"]);
$this->_contentDir = strval($tab["contentDir"]);
if(substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
$this->_contentDir .= DIRECTORY_SEPARATOR;
$this->_cacheDir = strval($tab["cacheDir"]);
$this->_stagingDir = strval($tab["stagingDir"]);