#91758OptgroupViewHelper uses wrong method to set disabled attribute
Description
Using f:form.select.optgroup with attribute disabled=“true” causes uncaught exception.
Reason:
TYPO3\CMS\Fluid\ViewHelpers\Form\Select\OptgroupViewHelper (line 46 in current master) calls
$this->tag->addAttributes(‘disabled’, ‘disabled’)
instead of
$this->tag->addAttribute(‘disabled’, ‘disabled’)
addAttributes expects array as first argument.
Solution:
if ($this->arguments['disabled']) {
$this->tag->addAttribute('disabled', 'disabled');
} else {
$this->tag->removeAttribute('disabled');
}
or
if ($this->arguments['disabled']) {
$this->tag->addAttributes(['disabled'=>'disabled']);
} else {
$this->tag->removeAttribute('disabled');
}