Skip to content

Commit 688c043

Browse files
committed
Merge pull request OpenMage#17 from tmotyl/patch-1
Better log msg when template file doesn't exist.
2 parents bac91d8 + c5314f6 commit 688c043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/core/Mage/Core/Block/Template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ public function fetchView($fileName)
237237

238238
try {
239239
$includeFilePath = realpath($this->_viewDir . DS . $fileName);
240-
if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
240+
if ($includeFilePath != '' && (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks())) {
241241
include $includeFilePath;
242242
} else {
243-
Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, null, true);
243+
Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, true);
244244
}
245245

246246
} catch (Exception $e) {

0 commit comments

Comments
 (0)