Skip to content
Browse files

Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into …

…develop
  • Loading branch information...
2 parents 635b28d + ef758bd commit 335484595d72027d638e912bd55993f8e6f42d68 @it-can committed Nov 15, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 system/libraries/Form_validation.php
View
6 system/libraries/Form_validation.php
@@ -670,7 +670,11 @@ protected function _execute($row, $rules, $postdata = NULL, $cycles = 0)
// Strip the parameter (if exists) from the rule
// Rules can contain a parameter: max_length[5]
$param = FALSE;
- sscanf($rule, '%[^[][%[^]]', $rule, $param);
+ if (preg_match('/(.*?)\[(.*)\]/', $rule, $match))
+ {
+ $rule = $match[1];
+ $param = $match[2];
+ }
// Call the function that corresponds to the rule
if ($callback === TRUE)

0 comments on commit 3354845

Please sign in to comment.
Something went wrong with that request. Please try again.