MDL-29817 Form : advcheckbox allows attributes even without group key
authorRushikesh <rushikeshnalla9@gmail.com>
Thu, 21 Jan 2016 17:07:43 +0000 (22:37 +0530)
committerRushikesh <rushikeshnalla9@gmail.com>
Thu, 21 Jan 2016 17:07:43 +0000 (22:37 +0530)
lib/form/advcheckbox.php

index ff679d4..0d1c3cc 100644 (file)
@@ -61,7 +61,7 @@ class MoodleQuickForm_advcheckbox extends HTML_QuickForm_advcheckbox{
             $values = array(0, 1);
         }
 
-        if (!is_null($attributes['group'])) {
+        if (!empty($attributes['group'])) {
 
             $this->_group = 'checkboxgroup' . $attributes['group'];
             unset($attributes['group']);