diff options
author | Andrey Andreev <narf@devilix.net> | 2016-01-29 00:18:08 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-01-29 00:18:08 +0100 |
commit | 0b59bdd3cd647b44c83e746a5d3d3aa179325df4 (patch) | |
tree | 4798d13e46e048e15e1555d442cb291a27d6febb | |
parent | 168c7212a2b458bf27460e790b63066d24f2296d (diff) |
Fix a regression in Form helper caused by 0139e6a4a99cbe9b0cc06f394fa12d5691193b72
-rw-r--r-- | system/helpers/form_helper.php | 4 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 04778b084..3e1039525 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -791,7 +791,7 @@ if ( ! function_exists('set_checkbox')) // Unchecked checkbox and radio inputs are not even submitted by browsers ... if ($CI->input->method() === 'post') { - return ($input === 'value') ? ' checked="checked"' : ''; + return ($input === $value) ? ' checked="checked"' : ''; } return ($default === TRUE) ? ' checked="checked"' : ''; @@ -843,7 +843,7 @@ if ( ! function_exists('set_radio')) // Unchecked checkbox and radio inputs are not even submitted by browsers ... if ($CI->input->method() === 'post') { - return ($input === 'value') ? ' checked="checked"' : ''; + return ($input === $value) ? ' checked="checked"' : ''; } return ($default === TRUE) ? ' checked="checked"' : ''; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8e76f1d01..372261efd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4395) - :doc:`Query Builder <database/query_builder>` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. - Fixed a bug (#4399) - :doc:`Query Builder <database/query_builder>` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. - Fixed a bug (#4401) - :doc:`Query Builder <database/query_builder>` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. +- Fixed a regression in :doc:`Form Helper <helpers/form_helper>` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. Version 3.0.4 ============= |