mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix Error when using {include} within {capture} https://github.com/smarty-php/smarty/issues/100
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user