- bugfix nocache code was not removed in cache file when subtemplate did contain PHP short tags in text but no other

nocache code https://github.com/smarty-php/smarty/issues/300
This commit is contained in:
uwetews
2016-10-20 00:53:04 +02:00
parent 34e5739fc1
commit 6699299767
3 changed files with 5 additions and 3 deletions
@@ -63,7 +63,6 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
return '';
} elseif ($compiler->php_handling == Smarty::PHP_PASSTHRU || $_attr[ 'type' ] == 'unmatched') {
$compiler->tag_nocache = true;
$save = $compiler->template->compiled->has_nocache_code;
$output = addcslashes($_attr[ 'code' ], "'\\");
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
@@ -71,7 +70,6 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
$output .
"';?>",
true)));
$compiler->template->compiled->has_nocache_code = $save;
return '';
} elseif ($compiler->php_handling == Smarty::PHP_ALLOW) {
if (!($compiler->smarty instanceof SmartyBC)) {