Skip to content

Commit ce8fa5a

Browse files
committed
1 parent af84969 commit ce8fa5a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

system/libraries/Form_validation.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,9 @@ public function error_string($prefix = '', $suffix = '')
415415
*/
416416
public function run($group = '')
417417
{
418-
// Do we even have any data to process? Mm?
419-
$validation_array = empty($this->validation_data) ? $_POST : $this->validation_data;
420-
if (count($validation_array) === 0)
421-
{
422-
return FALSE;
423-
}
418+
$validation_array = empty($this->validation_data)
419+
? $_POST
420+
: $this->validation_data;
424421

425422
// Does the _field_data array containing the validation rules exist?
426423
// If not, we look to see if they were assigned via a config file

user_guide_src/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Bug fixes for 3.0.4
2626
- Fixed a bug (#4306) - :doc:`Database <database/index>` method ``version()`` didn't work properly with the 'mssql' driver.
2727
- Fixed a bug (#4039) - :doc:`Session Library <libraries/sessions>` could generate multiple (redundant) warnings in case of a read failure with the 'files' driver, due to a bug in PHP.
2828
- Fixed a bug where :doc:`Session Library <libraries/sessions>` didn't have proper error handling on PHP 5 (due to a PHP bug).
29+
- Fixed a bug (#4312) - :doc:`Form Validation Library <libraries/form_validation>` didn't provide error feedback for failed validation on empty requests.
2930

3031
Version 3.0.3
3132
=============

0 commit comments

Comments
 (0)