[BUGFIX] Fix double-stdWrapping of GIFBUILDER's TEXT object
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Imaging / GifBuilder.php
index 5cffde9..9c2b8e1 100644 (file)
@@ -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']) {