From ce8fa5acfe0e7f9d8b974fa470201a9404667b3d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 12:57:09 +0200 Subject: Fix #4312 --- system/libraries/Form_validation.php | 9 +++------ user_guide_src/source/changelog.rst | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index a158225ee..c2212585d 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -415,12 +415,9 @@ class CI_Form_validation { */ public function run($group = '') { - // Do we even have any data to process? Mm? - $validation_array = empty($this->validation_data) ? $_POST : $this->validation_data; - if (count($validation_array) === 0) - { - return FALSE; - } + $validation_array = empty($this->validation_data) + ? $_POST + : $this->validation_data; // Does the _field_data array containing the validation rules exist? // If not, we look to see if they were assigned via a config file diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index caa4455d8..ab08c2f6e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.4 - Fixed a bug (#4306) - :doc:`Database ` method ``version()`` didn't work properly with the 'mssql' driver. - Fixed a bug (#4039) - :doc:`Session Library ` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP. - Fixed a bug where :doc:`Session Library ` didn't have proper error handling on PHP 5 (due to a PHP bug). +- Fixed a bug (#4312) - :doc:`Form Validation Library ` didn't provide error feedback for failed validation on empty requests. Version 3.0.3 ============= -- cgit v1.2.3-24-g4f1b