Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 2.6.18 : problem with object function

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Shain
Smarty n00b


Joined: 21 Mar 2007
Posts: 2

PostPosted: Thu Mar 22, 2007 9:59 am    Post subject: Smarty 2.6.18 : problem with object function Reply with quote

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 :

Code:
{$ad->getName()}


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
Code:
{$adName}


But for some situation, it isn't usefull Sad
Can you help me ?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Mar 22, 2007 10:47 am    Post subject: Reply with quote

Works fine for me in 2.6.18.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Shain
Smarty n00b


Joined: 21 Mar 2007
Posts: 2

PostPosted: Fri Mar 23, 2007 10:34 am    Post subject: Reply with quote

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
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sat Mar 24, 2007 12:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP