[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    [SMARTY-DEV] Bug with default_modifiers and isset in if
From:       ghostgambler () gmx ! de
Date:       2006-03-17 19:51:43
Message-ID: 441B134F.9040009 () gmx ! de
[Download RAW message or body]

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

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic