summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-12 13:35:13 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-12 13:35:13 +0100
commit139bba1272f1406e8f60bba0e7b9c261715b406c (patch)
tree67eb11db285377d1d49eadb0891e429b56d6b5da /system/libraries
parent8de036be27b55cc7587f0dfcb1c0fbcc88c5cf8f (diff)
parenta0556f128417467faaa7048bb1bf8da154e79582 (diff)
Merge branch '3.0-stable' into develop
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 296ddb92a..09d6c9a97 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -583,7 +583,10 @@ class CI_Form_validation {
protected function _execute($row, $rules, $postdata = NULL, $cycles = 0)
{
// If the $_POST data is an array we will run a recursive call
- if (is_array($postdata))
+ //
+ // Note: We MUST check if the array is empty or not!
+ // Otherwise empty arrays will always pass validation.
+ if (is_array($postdata) && ! empty($postdata))
{
foreach ($postdata as $key => $val)
{