Re: Bug with default_modifiers and isset in if

From: Date: Sat, 18 Mar 2006 10:28:13 +0000
Subject: Re: Bug with default_modifiers and isset in if
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2844@lists.php.net to get a copy of this message
Fixed it myself... Smarty_Compiler.class.php Somewhat around line 1377 Just insert a new case: case "isset": ++$i; $token = &$tokens[$i]; if ($token != '(') { $this->_syntax_error("no following ( after isset", E_USER_ERROR, __FILE__, __LINE__); } ++$i; $token = &$tokens[$i]; $temp = $this->default_modifiers; $this->default_modifiers = null; $token = $this->_parse_var_props($token); $this->default_modifiers = $temp; if (substr($token, 0, 1) != '$') { $this->_syntax_error("no variable in isset", E_USER_ERROR, __FILE__, __LINE__); } ++$i; $token = &$tokens[$i]; if ($token != ')') { $this->_syntax_error("no following ) after isset", E_USER_ERROR, __FILE__, __LINE__); } break; I don't know if there is an "easier" or "more beautiful" way ... this is just a brutal fix (but it works ^^)

« previous php.smarty.dev (#2844) next »