|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Shain Smarty n00b
Joined: 21 Mar 2007 Posts: 2
|
Posted: Thu Mar 22, 2007 9:59 am Post subject: Smarty 2.6.18 : problem with object function |
|
|
I've just updated Smarty on a website : 2.6.14 to 2.6.18. I've now a problem that I don't understand : I can't use the method to the objects that I assign to Smarty. For example :
Code: | $smarty->assign('ad', $ad); |
$ad is an objet with a method getName(). The following Smarty code doesn't work now :
That I don't understand is with the 2.6.14 version, there was no problem ! Now, to get a result, I have to do :
Code: | $smarty->assign('adName', $ad->getName); |
and
But for some situation, it isn't usefull
Can you help me ? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Mar 22, 2007 10:47 am Post subject: |
|
|
Works fine for me in 2.6.18. |
|
Back to top |
|
Shain Smarty n00b
Joined: 21 Mar 2007 Posts: 2
|
Posted: Fri Mar 23, 2007 10:34 am Post subject: |
|
|
ok. Maybe it's a problem with the PHP version ? Our server run with PHP5 but the object development is made like in PHP4 (for historical reason). Do you think it can be the reason of the dysfonctionnement ? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Mar 24, 2007 12:33 am Post subject: |
|
|
For starters, do ensure that you don't migrate compiled templates from one version of PHP to another (ie: between 4 and 5). Rather, allow the templates to be recompiled on each target platform. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|