commit | 6b114ae363eb94328b9d367492ae1b555a19a26c | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@bofh.bg> | Fri Jul 13 12:05:52 2012 +0300 |
committer | Andrey Andreev <narf@bofh.bg> | Fri Jul 13 12:05:52 2012 +0300 |
tree | 2b6ef90dfe11af492c4a31801765ca6634318235 | |
parent | 6648da07a4dc001d5e9d2c16e501d563e7fa2118 [diff] [blame] |
Fix issue #1613
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 0c5d550..1bccac3 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php
@@ -340,8 +340,13 @@ { $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)