diff --git a/inc/classes/BxDolTemplate.php b/inc/classes/BxDolTemplate.php index f2f04e578a..553451217e 100644 --- a/inc/classes/BxDolTemplate.php +++ b/inc/classes/BxDolTemplate.php @@ -3326,6 +3326,7 @@ function _getAbsoluteLocation($sType, $sFolder, $sName, $sCheckIn = BX_DOL_TEMPL $sRoot = BX_DOL_URL_ROOT; } + $aParts = []; if(strpos($sName,'|') !== false) { $aParts = explode('|', $sName); $sName = $aParts[1]; @@ -3375,9 +3376,8 @@ function _getAbsoluteLocation($sType, $sFolder, $sName, $sCheckIn = BX_DOL_TEMPL /** * try to find from received path */ - if(!$sResult && @is_file(BX_DIRECTORY_PATH_ROOT . $aParts[0] . DIRECTORY_SEPARATOR . $aParts[1])) { + if(!$sResult && isset($aParts[0], $aParts[1]) && @is_file(BX_DIRECTORY_PATH_ROOT . $aParts[0] . DIRECTORY_SEPARATOR . $aParts[1])) $sResult = $sRoot . $aParts[0] . $sDivider . $aParts[1]; - } if(isset($sLocationKey)) $this->removeLocation($sLocationKey);