[BUGFIX] fallbackRendering is always called 95/19195/2
authorSimon Schaufelberger <simonschaufi@googlemail.com>
Tue, 22 Jan 2013 22:33:45 +0000 (23:33 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 22 Mar 2013 17:53:17 +0000 (18:53 +0100)
When rendering textpic, the content object rendering is always called for
the Typoscript setting fallbackRendering which is not always defined.

Change-Id: I2ebfffd2ece8022136c4fcc8d0e12d552486dd32
Fixes: #44732
Releases: 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/19195
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 93ae4bb..f43178a 100644 (file)
@@ -505,7 +505,9 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                // Use the calculated information (amount of images, if global caption is wanted) to choose a different rendering method for the images-block
                $GLOBALS['TSFE']->register['imageCount'] = $imgCount;
                $GLOBALS['TSFE']->register['renderGlobalCaption'] = $renderGlobalCaption;
-               $fallbackRenderMethod = $this->cObj->cObjGetSingle($conf['fallbackRendering'], $conf['fallbackRendering.']);
+               if ($conf['fallbackRendering']) {
+                       $fallbackRenderMethod = $this->cObj->cObjGetSingle($conf['fallbackRendering'], $conf['fallbackRendering.']);
+               }
                if ($fallbackRenderMethod && is_array($conf['rendering.'][$fallbackRenderMethod . '.'])) {
                        $conf = $this->cObj->joinTSarrays($conf, $conf['rendering.'][$fallbackRenderMethod . '.']);
                }