[BUGFIX] Reinsert ommitted vars for ternary operators 09/47109/2
authorJo Hasenau <info@cybercraft.de>
Sat, 5 Mar 2016 16:55:38 +0000 (17:55 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 5 Mar 2016 17:32:17 +0000 (18:32 +0100)
When the check is done with multiple variables omitting the first part
of a ternary operator just inserts the boolean result of the check
but not the variable

Change-Id: If683770435995cac079fb2fd42344ba1cc15a08f
Resolves: #70242
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/47109
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php

index 9056ca9..c049b5e 100644 (file)
@@ -308,7 +308,7 @@ class RichTextElement extends AbstractFormElement
             $inlineStackProcessor->initializeByGivenStructure($this->data['inlineStructure']);
             $inlineStructureDepth = $inlineStackProcessor->getStructureDepth();
             $width -= $inlineStructureDepth > 0 ? ($inlineStructureDepth + 1) * 12 : 0;
-            $widthOverride = isset($backendUser->uc['rteWidth']) && trim($backendUser->uc['rteWidth']) ?: trim($this->processedRteConfiguration['RTEWidthOverride']);
+            $widthOverride = isset($backendUser->uc['rteWidth']) && trim($backendUser->uc['rteWidth']) ? trim($backendUser->uc['rteWidth']) : trim($this->processedRteConfiguration['RTEWidthOverride']);
             if ($widthOverride) {
                 if (strstr($widthOverride, '%')) {
                     if ($this->client['browser'] !== 'msie') {
@@ -320,7 +320,7 @@ class RichTextElement extends AbstractFormElement
             }
             $width = strstr($width, '%') ? $width : $width . 'px';
             $height = 380 + (isset($options['RTELargeHeightIncrement']) ? (int)$options['RTELargeHeightIncrement'] : 0);
-            $heightOverride = isset($backendUser->uc['rteHeight']) && (int)$backendUser->uc['rteHeight'] ?: (int)$this->processedRteConfiguration['RTEHeightOverride'];
+            $heightOverride = isset($backendUser->uc['rteHeight']) && (int)$backendUser->uc['rteHeight'] ? (int)$backendUser->uc['rteHeight'] : (int)$this->processedRteConfiguration['RTEHeightOverride'];
             $height = $heightOverride > 0 ? $heightOverride . 'px' : $height . 'px';
             $paddingRight = '2';
             $editorWrapWidth = '99%';