[HttpKernel] Check if lock can be released

Make sure the `$cache->release()` method exists before executing it.
This commit is contained in:
Sjoerd Adema 2020-01-21 17:49:30 +01:00
parent a4ed963409
commit 2001e54e82
1 changed files with 4 additions and 1 deletions

View File

@ -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);