[BUGFIX] Prevent fatal error in TemplatePaths without TS 48/51048/3
authorClaus Due <claus@namelesscoder.net>
Tue, 27 Dec 2016 13:33:51 +0000 (14:33 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 5 Jan 2017 19:32:29 +0000 (20:32 +0100)
This fixes an issue with Fluid being asked to render a
template at an execution point where no TS can be
resolved (ConfigurationManager "get full typoscript"
returns null).

Casting the potentially null return value to an array
completely avoids the issue, since Fluid is perfectly
capable of generating fallback expected paths which
always point to the right extension resources folders.

Change-Id: I3e07fb0248cb9d0f1faa560e6f72a47e41314763
Releases: master
Resolves: #79098
Reviewed-on: https://review.typo3.org/51048
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Markus Klein <markus.klein@typo3.org>

index ec989e1..b73389e 100644 (file)
@@ -104,7 +104,7 @@ class TemplatePaths extends \TYPO3Fluid\Fluid\View\TemplatePaths
         } else {
             if (empty($this->typoScript)) {
                 $this->typoScript = GeneralUtility::removeDotsFromTS(
-                    $this->getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
+                    (array)$this->getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
             $signature = str_replace('_', '', $extensionKey);