summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-06-11 16:44:20 +0200
committerAndrey Andreev <narf@devilix.net>2015-06-11 16:44:20 +0200
commit29de16588458b1abc1b2fb4d125bd9fe04e755c6 (patch)
tree927e8ad5fff537629a765de6d8f1216a4a99333d /system/libraries/Form_validation.php
parent38b5eb0cccd06c1819c5c69fc967ce802b39835a (diff)
Fix #3904
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 36a8148df..0251286ea 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -618,6 +618,12 @@ class CI_Form_validation {
$rules = array(1 => $rule);
break;
}
+ elseif (is_array($rule) && isset($rule[0], $rule[1]) && is_callable($rule[1]))
+ {
+ $callback = TRUE;
+ $rules = array($rule[0] => $rule[1]);
+ break;
+ }
}
if ( ! $callback)