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'); }
Updated by Gerrit Code Review over 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65244
Updated by Georg Ringer about 3 years ago
- Related to Bug #92656: Address Fluid view helper flaws added
Updated by Georg Ringer about 3 years ago
- Status changed from Under Review to Closed
solved with #92656
Actions