[BUGFIX] fallbackRendering is always called 61/17661/3
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:49:04 +0000 (18:49 +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/17661
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 5354f10..8e4d4ee 100644 (file)
@@ -493,7 +493,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 . '.']);
                }