From 5cd832a59e9ffb7debd54ba65a6fdea2ec4cc8d2 Mon Sep 17 00:00:00 2001 From: Romain Canon Date: Wed, 11 Sep 2019 15:39:42 +0200 Subject: [PATCH] [BUGFIX] Handle invalid cache entry --- Classes/Form/FormObject/FormObjectFactory.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/Form/FormObject/FormObjectFactory.php b/Classes/Form/FormObject/FormObjectFactory.php index 4d283af..b042cb6 100644 --- a/Classes/Form/FormObject/FormObjectFactory.php +++ b/Classes/Form/FormObject/FormObjectFactory.php @@ -214,9 +214,11 @@ protected function getStaticInstance($className) if (false === isset($this->static[$cacheIdentifier])) { $cacheInstance = $this->getCacheInstance(); - if ($cacheInstance->has($cacheIdentifier)) { - $static = $cacheInstance->get($cacheIdentifier); - } else { + $static = $cacheInstance->has($cacheIdentifier) + ? $cacheInstance->get($cacheIdentifier) + : null; + + if (!$static instanceof FormObjectStatic) { $static = $this->buildStaticInstance($className); $static->getObjectHash();