Skip to content

Commit

Permalink
[BUGFIX] Replace shorthand ternary operator in CheckboxElement
Browse files Browse the repository at this point in the history
Instead of using the shorthand ternary operator use a regular ternary
operator to avoid an invalid HTML attribute '1'.

Resolves: #92640
Releases: master, 10.4
Change-Id: Ibf14dfaafd34158c71d71c99ddbc70d04795f3d9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66229
Tested-by: Josef Glatz <josefglatz@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Josef Glatz <josefglatz@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
  • Loading branch information
georgringer authored and ervaude committed Oct 21, 2020
1 parent 34df0fc commit 7001964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -192,7 +192,7 @@ class="checkbox-input"
value="1"
data-formengine-input-name="' . htmlspecialchars($additionalInformation['itemFormElName']) . '"
' . $checkboxParameters . '
' . (!$disabled ?: ' disabled="disabled"') . '
' . (!$disabled ? '' : ' disabled="disabled"') . '
id="' . $checkboxId . '" />
<label class="checkbox-label" for="' . $checkboxId . '">
<span class="checkbox-label-switch">
Expand Down
Expand Up @@ -192,7 +192,7 @@ class="checkbox-input"
value="1"
data-formengine-input-name="' . htmlspecialchars($additionalInformation['itemFormElName']) . '"
' . $checkboxParameters . '
' . (!$disabled ?: ' disabled="disabled"') . '
' . (!$disabled ? '' : ' disabled="disabled"') . '
id="' . $checkboxId . '" />
<label class="checkbox-label" for="' . $checkboxId . '">
<span class="checkbox-label-text">' . $this->appendValueToLabelInDebugMode(($label ? htmlspecialchars($label) : '&nbsp;'), $formElementValue) . '</span>
Expand Down

0 comments on commit 7001964

Please sign in to comment.