- bugfix Error when using {include} within {capture} https://github.com/smarty-php/smarty/issues/100

This commit is contained in:
uwetews
2015-10-25 04:53:58 +01:00
parent 1a51c1c17b
commit 42e722926a

View File

@@ -122,9 +122,13 @@ abstract class Smarty_Template_Resource_Base
//
// render compiled or saved template code
//
if (!isset($_template->_cache['capture_stack'])) {
$_template->_cache['capture_stack'] = array();
}
$_saved_capture_level = count($_template->_cache['capture_stack']);
$unifunc($_template);
// any unclosed {capture} tags ?
if (isset($_template->_cache['capture_stack'][0])) {
if ($_saved_capture_level != count($_template->_cache['capture_stack'])) {
$_template->capture_error();
}
if (isset($_template->smarty->security_policy)) {