[BUGFIX] Check for valid FrontendInterface for page title cache 82/59082/2
authorRichard Haeser <richard@maxserv.com>
Mon, 10 Dec 2018 21:33:56 +0000 (22:33 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 11 Dec 2018 09:49:48 +0000 (10:49 +0100)
The PageTitleProviderManager will now check if the page cache object
is an instance of FrontendInterface before getting the value from cache.

Resolves: #87116
Releases: master
Change-Id: I14838b41a7cba653d5f4e6c875c647f547673644
Reviewed-on: https://review.typo3.org/59082
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/PageTitle/PageTitleProviderManager.php

index 629ed4e..7908305 100644 (file)
@@ -16,9 +16,9 @@ namespace TYPO3\CMS\Core\PageTitle;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Cache\Backend\AbstractBackend;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException;
+use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
 use TYPO3\CMS\Core\Service\DependencyOrderingService;
 use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Core\TypoScript\TypoScriptService;
@@ -31,7 +31,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 class PageTitleProviderManager implements SingletonInterface
 {
     /**
-     * @var \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
+     * @var FrontendInterface
      */
     protected $pageCache;
 
@@ -57,7 +57,7 @@ class PageTitleProviderManager implements SingletonInterface
 
         foreach ($orderedTitleProviders as $provider => $configuration) {
             $cacheIdentifier =  $this->getTypoScriptFrontendController()->newHash . '-titleTag-' . $provider;
-            if ($this->pageCache instanceof AbstractBackend &&
+            if ($this->pageCache instanceof FrontendInterface &&
                 $pageTitle = $this->pageCache->get($cacheIdentifier)
             ) {
                 break;