- improvement new Smarty::$extends_recursion property to disable execution of {extends} in templates called by extends resource

https://github.com/smarty-php/smarty/issues/296
This commit is contained in:
uwetews
2016-09-30 02:30:39 +02:00
parent 68ab01dc9e
commit 80af6ea2b5
3 changed files with 5 additions and 4 deletions

View File

@@ -111,7 +111,7 @@ class Smarty_Internal_Runtime_Inheritance
ob_end_clean();
$this->state = 2;
}
if (isset($template) && ($tpl->parent->source->type !== 'extends' || $tpl->smarty->extends_recursion)) {
if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends') || $tpl->smarty->extends_recursion)) {
$tpl->_subTemplateRender($template, $tpl->cache_id, $tpl->compile_id, $tpl->caching ? 9999 : 0,
$tpl->cache_lifetime, array(), 2, false, $uid, $func);
}