From 620674493a68e97687fe1df236eb2a11684c0ed6 Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 28 Feb 2003 15:45:42 +0000 Subject: [PATCH] fix "once" var compiling to work with new attr compiling methods for include_php --- NEWS | 1 + libs/Smarty_Compiler.class.php | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) 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))