diff options
author | Eric Roberts <eric@cryode.com> | 2012-07-14 01:30:21 +0200 |
---|---|---|
committer | Eric Roberts <eric@cryode.com> | 2012-07-14 01:30:21 +0200 |
commit | fbdad67cac99868509bc1a27affdfc3e4b2a1dee (patch) | |
tree | 52c1e86324ee1a8bb36e119711707bdf09419a87 /system/helpers/form_helper.php | |
parent | fa337081ced1b1d34805d28f8307f069edf16cdf (diff) | |
parent | decc642f8c81dcf57e2e3217a44d5b1385163456 (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/helpers/form_helper.php')
-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) |