Bug with default_modifiers and isset in if
| From: | ghostgambler at gmx dot de | Date: | Fri, 17 Mar 2006 19:51:43 +0000 |
| Subject: | Bug with default_modifiers and isset in if | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2843@lists.php.net to get a copy of this message | ||
When you set the default modifiers
$smarty->default_modifiers = array('escape:"htmlall":"utf-8"');
and then have a template like this
{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
the output is something like that
<?php
if (isset(((is_array($_tmp=$this->_tpl_vars['_smarty_debug_output'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', "utf-8") : smarty_modifier_escape($_tmp, 'htmlall', "utf-8"))) && ((is_array($_tmp=$this->_tpl_vars['_smarty_debug_output'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', "utf-8") : smarty_modifier_escape($_tmp, 'htmlall', "utf-8")) == 'html'): ?>
and it's obvious that this is not possible.
Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '$' in XYZ on line XYZ
Would be nice to have this fixed soon. The default modifiers are quite helpful ^^
Bye, Uli