diff --git a/NEWS b/NEWS index 35a5e6ab..1d1feb78 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fix "once" var compiling for include_php (Monte) - added nl2br modifier to distribution (Monte) - added html_image to distribution (Monte) - added cat modifier to distribution (Monte) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index d44f4a74..1f33393f 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -863,10 +863,9 @@ class Smarty_Compiler extends Smarty { $this->_syntax_error("missing 'file' attribute in include_php tag", E_USER_ERROR, __FILE__, __LINE__); } - $assign_var = $this->_dequote($attrs['assign']); - - $once_var = ( $attrs['once'] === false ) ? 'false' : 'true'; - + $assign_var = $this->_dequote($attrs['assign']); + $once_var = ( $attrs['once'] == 'false' ) ? 'false' : 'true'; + foreach($attrs as $arg_name => $arg_value) { if($arg_name != 'file' AND $arg_name != 'once' AND $arg_name != 'assign') { if(is_bool($arg_value))