summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-13 19:16:35 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-13 19:16:35 +0100
commitcde43687ef19aa23ee6796925270961b760369f3 (patch)
tree95bca7c0f6bfe6b61a1cef879ca1ddc992d9a1e8 /system/libraries/Form_validation.php
parent81c87cd453c61a17e28aff2cc3f4ea76d4d19c59 (diff)
Allow native PHP functions used as rules to accept an additional parameter
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 78b1ae016..9aa07a1a8 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -582,7 +582,7 @@ class CI_Form_validation {
// Users can use any native PHP function call that has one param.
if (function_exists($rule))
{
- $result = $rule($postdata);
+ $result = ($param !== FALSE) ? $rule($postdata, $param) : $rule($postdata);
if ($_in_array === TRUE)
{