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

[email protected] (Hans Jürgen von Lengerke)
Newsgroups php.smarty.dev
Message-ID <[email protected]>
Hi Monte,

> Give the CVS version another try.

Much better now, but I have still found one that doesn't work (sorry 
dude! I almost feel bad about it :-)

    {$obj->six()+$obj->six()}

I have extended the test suite. Please find the relevant files attached. 
The above failing case is included. Also, I have renamed 
templates/assign_obj.tpl to templates/parse_obj_meth.tpl (I know, you 
have already comitted the other file, but the new name is more 
appropriate). There is also a new test template, 
templates/parse_math.tpl, and a new test in test_cases.php testing it.

Hans
parse_math.tpl (text/plain, 650 B)
{foreach name=loop from=$items item=i}
                {$smarty.foreach.loop.iteration+2}
                {$smarty.foreach.loop.iteration+$flt}
                {$smarty.foreach.loop.iteration+$obj->six()}
                {$smarty.foreach.loop.iteration+$obj->ten}
{/foreach}
                {$obj->ten+$flt}
                {$obj->ten*$flt}
                {$obj->six()+$obj->six()}
                {$obj->six()+$obj->ten}
                {$obj->ten+$obj->ten}
                {$obj->ten+$obj->six()}
                {$flt+$obj->six()}
                {$obj->six()+$flt}
                {$items.0+$obj->six()}
                {$obj->six()+$items.0}
parse_obj_meth.tpl (text/plain, 352 B)
                {$obj->meth($foo, 2.5)}
                {$obj->meth(2.5, $foo)}
                {$obj->meth(2.5)}
                {$obj->meth($obj->val, "foo")}
                {$obj->meth("foo", $obj->val)}
                {$obj->meth("foo", $foo)}
                {$obj->meth($obj->arr.one, 2)}
                {$obj->meth($obj->meth("foo", $foo))}
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.