Skip to content

Commit

Permalink
[BUGFIX] Check for valid FrontendInterface for page title cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Haeser authored and ohader committed Dec 11, 2018
1 parent 9988b62 commit 412666d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* 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;
Expand All @@ -31,7 +31,7 @@
class PageTitleProviderManager implements SingletonInterface
{
/**
* @var \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
* @var FrontendInterface
*/
protected $pageCache;

Expand All @@ -57,7 +57,7 @@ public function getTitle(): string

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;
Expand Down

0 comments on commit 412666d

Please sign in to comment.