|
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 |
arne_anka Smarty Rookie
Joined: 26 Jun 2006 Posts: 6
|
Posted: Fri Jul 14, 2006 10:03 am Post subject: SmartyValidate: php-warnings when sending empty form |
|
|
hi,
i just stumpled upon SmartyValidate and tried the given example (http://www.phpinsider.com/php/code/SmartyValidate/).
if i send the empty form i get
Quote: |
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 143
Warning: Cannot use a scalar value as an array in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 241
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 143
Warning: Cannot use a scalar value as an array in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 241
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 143
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 143
Warning: Cannot use a scalar value as an array in /usr/share/php/smarty/libs/SmartyValidate.class.php on line 241
|
i think the logic fails to handle empty arrays/fields.
is this a failure of the example or a bug of SmartyValidate? |
|
Back to top |
|
arne_anka Smarty Rookie
Joined: 26 Jun 2006 Posts: 6
|
Posted: Fri Jul 14, 2006 12:09 pm Post subject: |
|
|
well, only those with empty=true, i e
Code: |
SmartyValidate::register_validator($id, $field, $criteria, $empty = true)
|
trigger warnings, so it is rather a bug. |
|
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
|