diff options
author | Andrey Andreev <narf@devilix.net> | 2016-05-25 09:54:36 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-05-25 09:54:36 +0200 |
commit | 9e78be0d736ed0caab396f58109ce1db7169d727 (patch) | |
tree | 450459f8e77b3f2d651235d79a85001dce96cc1a /system/libraries | |
parent | ad20f71b0395d8fadd417b3a2b580b6c53a80000 (diff) |
Fix #4639
Really fix #4633
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Form_validation.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index f5b07a205..04445f5b7 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -696,6 +696,17 @@ class CI_Form_validation { $param = $match[2]; } + // Ignore empty, non-required inputs with a few exceptions ... + if ( + ($postdata === NULL OR $postdata === '') + && $callback === FALSE + && $callable === FALSE + && ! in_array($rule, array('required', 'isset', 'matches'), TRUE) + ) + { + continue; + } + // Call the function that corresponds to the rule if ($callback OR $callable !== FALSE) { |