From 2001e54e8223d6263313c7adc8554547a4f320b8 Mon Sep 17 00:00:00 2001 From: Sjoerd Adema Date: Tue, 21 Jan 2020 17:49:30 +0100 Subject: [PATCH] [HttpKernel] Check if lock can be released Make sure the `$cache->release()` method exists before executing it. --- src/Symfony/Component/HttpKernel/Kernel.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 434e6b55ba..7650257963 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -634,7 +634,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); - $cache->release(); + if (method_exists($cache, 'release')) { + $cache->release(); + } + $this->container = require $cachePath; $this->container->set('kernel', $this);