summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-06-10 16:38:26 +0200
committerAndrey Andreev <narf@devilix.net>2015-06-10 16:38:26 +0200
commit38b5eb0cccd06c1819c5c69fc967ce802b39835a (patch)
treea42da043726ae744d9580a99bc7feffad398e25e
parentb76394834a3e36e8c376913cd9666a8d7a4cea45 (diff)
Fix #3903
-rw-r--r--system/libraries/Form_validation.php5
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 7599602c0..36a8148df 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -815,11 +815,10 @@ class CI_Form_validation {
// Callable rules might not have named error messages
if ( ! is_string($rule))
{
- return;
+ $line = $this->CI->lang->line('form_validation_error_message_not_set').'(Anonymous function)';
}
-
// Check if a custom message is defined
- if (isset($this->_field_data[$row['field']]['errors'][$rule]))
+ elseif (isset($this->_field_data[$row['field']]['errors'][$rule]))
{
$line = $this->_field_data[$row['field']]['errors'][$rule];
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 7e14152e3..3a6db3daf 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -31,6 +31,7 @@ Bug fixes for 3.0.1
- Fixed a bug (#3854) - `field_data()` didn't work properly with the Oracle (OCI8) database driver.
- Fixed a bug in the :doc:`Database Utility Class <database/utilities>` method ``csv_from_result()`` didn't work with a whitespace CSV delimiter.
- Fixed a bug (#3890) - :doc:`Input Library <libraries/input>` method ``get_request_header()`` treated header names as case-sensitive.
+- Fixed a bug (#3903) - :doc:`Form Validation Library <libraries/form_validation>` ignored "unnamed" closure validation rules.
Version 3.0.0
=============