[BUGFIX] fallbackRendering is always called 97/19197/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 22 Mar 2013 17:51:21 +0000 (18:51 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 22 Mar 2013 17:54:07 +0000 (18:54 +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/19197
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php

index 1baa00c..c0376a7 100755 (executable)
@@ -538,7 +538,9 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                        // 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 . '.']);
                }