Re: [SMARTY-DEV] Re: [SMARTY] Re: object calls fail after upgrade to 2.6.4

[email protected] (Monte Ohrt)
Newsgroups php.smarty.dev
Message-ID <[email protected]>
Give the CVS version another try.
No there is no comprehensive bug tracking system atm, just the dev 
mailing list.

Thanks
Monte

Hans_JXrgen_von_Lengerke wrote:

> Hi Monte,
>
> sorry, I was really busy today so I couldn't answer you until now. All
> the object parameter issues seem to be resolved now, but I have now
> found several bugs related to math:
>
>   {foreach name=loop from=$items item=i}
>       {$smarty.foreach.loop.iteration+$obj->arr.two}
>   {/foreach}
>
> the above fails to parse with
>
> PHP Fatal error:  Smarty error: [in assign_obj.tpl line 10]: syntax
> error: $smarty.foreach.loop is an invalid reference
> (Smarty_Compiler.class.php, line 1962) in
> /home/entw/hj/ext-cvs/smarty_HEAD/libs/Smarty.class.php on line 1084
>
> These fail too:
>       {$smarty.foreach.loop.iteration+$obj->arr()}
>       {$smarty.foreach.loop.iteration+$obj->num}
>       {$obj->meth()+$obj->meth()}
>       {$obj->meth()+$obj->val}
>       {$obj->meth()+$foo}
>       {$obj->meth()+2}
>
> This one is OK:
>       {$smarty.foreach.loop.iteration+2}
>
> And these are parsed wrongly:
>       {$obj->val+$foo}
>       {$obj->val*$foo}
>       {$obj->val+$obj->val}
>       {$obj->val+$obj->meth()}
>       {$foo+$obj->meth()}
>       {$foo.bar+$obj->meth()}
>
> They result in:
>       <?php echo $this->_tpl_vars['obj']->val+$foo; ?>
>       <?php echo $this->_tpl_vars['obj']->val*$foo; ?>
>       <?php echo $this->_tpl_vars['obj']->val+$obj->val; ?>
>       <?php echo $this->_tpl_vars['obj']->val+$obj->meth(); ?>
>       <?php echo $this->_tpl_vars['foo']+$obj->meth(); ?>
>       <?php echo $this->_tpl_vars['foo']['bar']+$obj->meth(); ?>
>
> Do you have a bug tracking system somewhere? I couldn't find anything
> about it on the web page, but I didn't look very hard.
>
> I will provide unit test cases for all of the above later.
>
> Hans
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.