|
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 |
einlemming Smarty Rookie
Joined: 04 May 2004 Posts: 10 Location: Stuttgart, Germany
|
Posted: Mon Aug 02, 2004 12:28 pm Post subject: SmartyValidate and PHP 5 |
|
|
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Aug 02, 2004 12:42 pm Post subject: |
|
|
I'm not into SmartyValidate, but i suppose
Code: | strtolower(get_class($smarty)) == 'smarty' |
should do the trick |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Aug 02, 2004 2:57 pm Post subject: |
|
|
Are you using version 2.2? I think this was already addressed. |
|
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
|