mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
-bugfix {assign} in a nocache section should not overwrite existing variable values
during compilation (issue 109)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== trunk =====
|
||||
30.07.2012
|
||||
-bugfix {assign} in a nocache section should not overwrite existing variable values
|
||||
during compilation (issue 109)
|
||||
|
||||
28.07.2012
|
||||
- bugfix array access of config variables did not work (Forum Topic 22527)
|
||||
|
||||
|
@@ -39,7 +39,11 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
|
||||
if ($compiler->tag_nocache || $compiler->nocache) {
|
||||
$_nocache = 'true';
|
||||
// create nocache var to make it know for further compiling
|
||||
$compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
|
||||
if (isset($compiler->template->tpl_vars[trim($_attr['var'], "'")])) {
|
||||
$compiler->template->tpl_vars[trim($_attr['var'], "'")]->nocache = true;
|
||||
} else {
|
||||
$compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
|
||||
}
|
||||
}
|
||||
// scope setup
|
||||
if (isset($_attr['scope'])) {
|
||||
|
Reference in New Issue
Block a user