mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix global variable assigned within template function are not seen after template function exit (Forum Topic 23800)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
26.11.2012
|
||||
- bugfix global variable assigned within template function are not seen after template function exit (Forum Topic 23800)
|
||||
|
||||
24.11.2012
|
||||
- made SmartyBC loadable via composer (Issue #124)
|
||||
|
||||
|
@@ -149,7 +149,8 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
|
||||
$compiler->has_code = false;
|
||||
$output = true;
|
||||
} else {
|
||||
$output = $plugins_string . $compiler->parser->current_buffer->to_smarty_php() . "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}}?>\n";
|
||||
$output = $plugins_string . $compiler->parser->current_buffer->to_smarty_php() . "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;
|
||||
foreach (Smarty::\$global_tpl_vars as \$key => \$value) if(!isset(\$_smarty_tpl->tpl_vars[\$key])) \$_smarty_tpl->tpl_vars[\$key] = \$value;}}?>\n";
|
||||
}
|
||||
// reset flag that we are compiling a template function
|
||||
$compiler->compiles_template_function = false;
|
||||
|
Reference in New Issue
Block a user