From 6a3472a055ea1cd1802a9a6195f00d49c34400fa Mon Sep 17 00:00:00 2001 From: jyps Date: Mon, 8 Oct 2012 18:23:52 +0200 Subject: [PATCH 1/1] [BUGFIX] Fix double-stdWrapping of GIFBUILDER's TEXT object During extensive overhaul of stdWrap from TYPO3 v4.4 to v4.5 a bug was introduced that led to double-stdWrapping of all properties of GIFBUILDER's TEXT object. Change-Id: Ib74fdc9899f3d0ee3f6fc96ffbb9c7dbc3ee01e2 Fixes: #41487 Releases: 6.2, 6.1, 6.0, 4.7, 4.5 Reviewed-on: https://review.typo3.org/16865 Reviewed-by: Stefan Neufeind Tested-by: Stefan Neufeind --- .../frontend/Classes/Imaging/GifBuilder.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php b/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php index 5cffde99effa..9c2b8e107b5e 100644 --- a/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php +++ b/typo3/sysext/frontend/Classes/Imaging/GifBuilder.php @@ -397,14 +397,20 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions { foreach ($sKeyArray as $theKey) { $theValue = $this->setup[$theKey]; if (intval($theKey) && ($conf = $this->setup[$theKey . '.'])) { - $isStdWrapped = array(); - foreach ($conf as $key => $value) { - $parameter = rtrim($key, '.'); - if (!$isStdWrapped[$parameter] && isset($conf[$parameter . '.'])) { - $conf[$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter . '.']); - $isStdWrapped[$parameter] = 1; + // apply stdWrap to all properties, except for TEXT objects + // all properties of the TEXT sub-object have already been stdWrap-ped + // before in ->checkTextObj() + if ($theValue !== 'TEXT') { + $isStdWrapped = array(); + foreach ($conf as $key => $value) { + $parameter = rtrim($key, '.'); + if (!$isStdWrapped[$parameter] && isset($conf[$parameter . '.'])) { + $conf[$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter . '.']); + $isStdWrapped[$parameter] = 1; + } } } + switch ($theValue) { case 'IMAGE': if ($conf['mask']) { -- 2.20.1