Smarty 4.5.5
Is this a bug or a very strange feature? If I define a modifier:
$this->smarty->registerPlugin('modifier', 'kprint_r_out', trim(...));
and call it like:
it will compile into
<?php echo kprint_r_out($_smarty_tpl->tpl_vars['myVar']->value);?>
even though kprint_r_out is only the name of the function, not the function itself (but kprint_r_out() does exist, otherwise it won't compile). The function (trim in this case) isn't used at all...
I like calling functions like function, but this is too weird. If it's intentional, it shouldn't be defined as a modifier with mandatory callback (that's not used).
Or am I abusing another Smarty functionality somehow?
Smarty 4.5.5
Is this a bug or a very strange feature? If I define a modifier:
and call it like:
{kprint_r_out($myVar)}it will compile into
even though
kprint_r_outis only the name of the function, not the function itself (butkprint_r_out()does exist, otherwise it won't compile). The function (trimin this case) isn't used at all...I like calling functions like function, but this is too weird. If it's intentional, it shouldn't be defined as a modifier with mandatory callback (that's not used).
Or am I abusing another Smarty functionality somehow?