From 700196461cbc9535090c6ca8807c099bfa05475f Mon Sep 17 00:00:00 2001 From: Georg Ringer Date: Wed, 21 Oct 2020 14:46:14 +0200 Subject: [PATCH] [BUGFIX] Replace shorthand ternary operator in CheckboxElement 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 Tested-by: Oliver Bartsch Tested-by: TYPO3com Tested-by: Daniel Goerz Reviewed-by: Josef Glatz Reviewed-by: Oliver Bartsch Reviewed-by: Daniel Goerz --- .../Classes/Form/Element/CheckboxLabeledToggleElement.php | 2 +- .../backend/Classes/Form/Element/CheckboxToggleElement.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/backend/Classes/Form/Element/CheckboxLabeledToggleElement.php b/typo3/sysext/backend/Classes/Form/Element/CheckboxLabeledToggleElement.php index 4078f2d9d396..13a666e8e50f 100644 --- a/typo3/sysext/backend/Classes/Form/Element/CheckboxLabeledToggleElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/CheckboxLabeledToggleElement.php @@ -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 . '" />