summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-18 12:05:17 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-18 12:05:17 +0200
commit6ac514484fffd9700c6ecc57cfa1b1fd105e37f6 (patch)
treeadfa16a4e902484bcb4cd53f606f16528cfd1faa /system/libraries
parent3751f9362b731f5f3d2e63176c364d6281fdf415 (diff)
Fix issue #1328
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index fb1c69caf..db773e252 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -649,7 +649,12 @@ class CI_Form_validation {
}
else
{
- $postdata = $this->_field_data[$row['field']]['postdata'];
+ // If we get an array field, but it's not expected - then it is most likely
+ // somebody messing with the form on the client side, so we'll just consider
+ // it an empty field
+ $postdata = is_array($this->_field_data[$row['field']]['postdata'])
+ ? NULL
+ : $this->_field_data[$row['field']]['postdata'];
}
// Is the rule a callback?