diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/form_helper.php | 7 |
1 files changed, 6 insertions, 1 deletions
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 .= '<optgroup label="'.$key."\">\n"; foreach ($val as $optgroup_key => $optgroup_val) |