From: skodak Date: Sun, 2 Aug 2009 11:37:37 +0000 (+0000) Subject: MDL-19982 fixed notice if group empty; merged from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bae2432219581deb65234e5fa8fa4c96a9dcedd5;p=moodle.git MDL-19982 fixed notice if group empty; merged from MOODLE_19_STABLE --- diff --git a/lib/form/selectgroups.php b/lib/form/selectgroups.php index 8cb0539cbd..733b415402 100644 --- a/lib/form/selectgroups.php +++ b/lib/form/selectgroups.php @@ -499,6 +499,9 @@ class MoodleQuickForm_selectgroups extends HTML_QuickForm_element { $cleanValue = null; foreach ($value as $v) { foreach ($this->_optGroups as $optGroup){ + if (empty($optGroup['options'])) { + continue; + } for ($i = 0, $optCount = count($optGroup['options']); $i < $optCount; $i++) { if ($v == $optGroup['options'][$i]['attr']['value']) { $cleanValue[] = $v;