Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: it-can/CodeIgniter
base: 635b28d10d
head fork: it-can/CodeIgniter
compare: 335484595d
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 15, 2012
@narfbg narfbg Revert a change from 7a7ad78
sscanf() is lightning fast, but doesn't have such thing as greediness and this breaks rule parameters containing a closing square bracket.
@it-can Merge branch 'develop' of git:// into …
Showing with 5 additions and 1 deletion.
  1. +5 −1 system/libraries/Form_validation.php
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)

No commit comments for this range

Something went wrong with that request. Please try again.