[BUGFIX] Fix site configuration caching 66/58366/4
authorSusanne Moog <susanne.moog@typo3.org>
Fri, 21 Sep 2018 09:52:25 +0000 (11:52 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 21 Sep 2018 11:29:49 +0000 (13:29 +0200)
Resolves: #86350
Releases: master
Change-Id: Iae67211c8a3421a8cdd78a68c88d15da43f9e67e
Reviewed-on: https://review.typo3.org/58366
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/core/Classes/Configuration/SiteConfiguration.php

index aecd628..ea77cde 100644 (file)
@@ -91,6 +91,8 @@ class SiteConfiguration
     {
         // Check if the data is already cached
         if ($siteConfiguration = $this->getCache()->get($this->cacheIdentifier)) {
+            // Due to the nature of PhpFrontend, the `<?php` and `#` wraps have to be removed
+            $siteConfiguration = preg_replace('/^<\?php\s*|\s*#$/', '', $siteConfiguration);
             $siteConfiguration = json_decode($siteConfiguration, true);
         }