Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SmartyValidate and PHP 5

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
einlemming
Smarty Rookie


Joined: 04 May 2004
Posts: 10
Location: Stuttgart, Germany

PostPosted: Mon Aug 02, 2004 12:28 pm    Post subject: SmartyValidate and PHP 5 Reply with quote

Hi,

I encountered a bug when using SmartyValidate and PHP 5 ( I assume that SmartyValidate is for php5 also)

SmartyValidate uses the get_class php function to check if the smarty object really exists. ( Example : SmartyValidate::connect source )

In PHP 5, get_class no longer returns the lowercase name of the object. It returns the original name, which is "Smarty" and not "smarty".

Code:

get_class($smarty) == strtolower('smarty')


will not work anymore.
_________________
See ya, Lemming
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


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

PostPosted: Mon Aug 02, 2004 12:42 pm    Post subject: Reply with quote

I'm not into SmartyValidate, but i suppose
Code:
strtolower(get_class($smarty)) == 'smarty'


should do the trick Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7365
Location: Lincoln Nebraska, USA

PostPosted: Mon Aug 02, 2004 2:57 pm    Post subject: Reply with quote

Are you using version 2.2? I think this was already addressed.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons 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