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

SmartyValidate: with E_STRICT

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


Joined: 27 Feb 2012
Posts: 1

PostPosted: Mon Feb 27, 2012 1:16 am    Post subject: SmartyValidate: with E_STRICT Reply with quote

Hi!
Recently, I tried to make my project using SmartyValidate 3.0.3 work with E_STRICT error_reporting level.
During the task I got some trouble in SmartyValidate->_failed_fields method so I changed the code like this.
I wish this will be of your help.
Thank you.

# By the way, is it OK to report SmartyValidate's bug at this forum? I could not find BTS for it...

Code:

Index: SmartyValidate.class.php
===================================================================
--- SmartyValidate.class.php
+++ SmartyValidate.class.php
@@ -175,7 +175,7 @@
             
             if(isset($_sess[$_key]['transform'])) {
                 $_trans_names = preg_split('![\s,]+!', $_sess[$_key]['transform'], -1, PREG_SPLIT_NO_EMPTY);
-                if($_sess[$_key]['trim']) {
+                if(isset($_sess[$_key]['trim']) && $_sess[$_key]['trim']) {
                     // put trim on front of transform array
                     array_unshift($_trans_names, 'trim');
                 }
Back to top
View user's profile Send private message
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