From 6b114ae363eb94328b9d367492ae1b555a19a26c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Jul 2012 12:05:52 +0300 Subject: Fix issue #1613 --- system/helpers/form_helper.php | 7 ++++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 0c5d55037..1bccac35c 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -340,8 +340,13 @@ if ( ! function_exists('form_dropdown')) { $key = (string) $key; - if (is_array($val) && ! empty($val)) + if (is_array($val)) { + if (empty($val)) + { + continue; + } + $form .= '\n"; foreach ($val as $optgroup_key => $optgroup_val) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0e9ec5e50..0c605dc6a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,6 +314,7 @@ Bug fixes for 3.0 - Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. - Fixed a bug in :doc:`Query Builder ` method join() where literal values were escaped as if they were fields. - Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. +- Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b