[BUGFIX] Ensure argument is an array in ContentObjectRenderer 81/35181/2
authorStefan Froemken <froemken@gmail.com>
Tue, 9 Dec 2014 09:55:31 +0000 (10:55 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 13 Dec 2014 14:19:34 +0000 (15:19 +0100)
This patch ensures that at least an empty array is passed to the
array_replace_recursive function to avoid warnings during rendering.

Resolves: #63701
Releases: master, 6.2
Change-Id: I047f45bd5199216aec6f37a0c9b0526c455cad92
Reviewed-on: http://review.typo3.org/35181
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 8879b34..e3dad0f 100644 (file)
@@ -7008,7 +7008,7 @@ class ContentObjectRenderer {
                        $old_conf = $confArr[$prop . '.'];
                        list($name, $conf) = $cF->getVal($key, $GLOBALS['TSFE']->tmpl->setup);
                        if (is_array($old_conf) && count($old_conf)) {
-                               $conf = array_replace_recursive($conf, $old_conf);
+                               $conf = array_replace_recursive(is_array($conf) ? $conf : array(), $old_conf);
                        }
                        $confArr[$prop . '.'] = $conf;
                }