Actions
Bug #91758
closedOptgroupViewHelper uses wrong method to set disabled attribute
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-07-07
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
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'); }
Actions