diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 3ffed7c..917e419 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -1038,6 +1038,12 @@ class html_writer { $attributes['name'] = $name; + if (!empty($attributes['disabled'])) { + $attributes['disabled'] = 'disabled'; + } else { + unset($attributes['disabled']); + } + $output = ''; foreach ($options as $value=>$label) { if (is_array($label)) {