diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-23 16:33:21 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-23 16:33:21 +0100 |
commit | 2d48b4f1a174473fa0539769a433ba78305c0faa (patch) | |
tree | 53f7d2b30d9100c5d5b6e4c0bd8125e5630bf571 | |
parent | 1b7a452c8331adbd306d3ab9d776a9ae073f1243 (diff) |
Fix #113
-rw-r--r-- | system/libraries/Form_validation.php | 3 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 7056558c5..b65c4881c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -496,7 +496,8 @@ class CI_Form_validation { return isset($array[$keys[$i]]) ? $this->_reduce_array($array[$keys[$i]], $keys, ($i+1)) : NULL; } - return $array; + // NULL must be returned for empty fields + return ($array === '') ? NULL : $array;; } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8de9d2f42..a20cd10f2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -453,6 +453,7 @@ Bug fixes for 3.0 - Fixed a bug (#777) - :doc:`Loader Library <libraries/loader>` didn't look for helper extensions in added package paths. - Fixed a bug (#18) - :doc:`APC Cache <libraries/caching>` driver didn't (un)serialize data, resulting in failure to store objects. - Fixed a bug (#188) - :doc:`Unit Testing Library <libraries/unit_testing>` filled up logs with error messages for non-existing language keys. +- Fixed a bug (#113) - :doc:`Form Validation Library <libraries/form_validation>` didn't properly handle empty fields that were specified as an array. Version 2.1.3 ============= |