Skip to content

Commit 5520e64

Browse files
author
Sjoerd Adema
committed
[HttpKernel] Check if lock can be released
Make sure the `$cache->release()` method exists before executing it.
1 parent f3b8745 commit 5520e64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Kernel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,10 @@ public function release()
634634
}
635635

636636
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
637-
$cache->release();
637+
if (method_exists($cache, 'release')) {
638+
$cache->release();
639+
}
640+
638641
$this->container = require $cachePath;
639642
$this->container->set('kernel', $this);
640643

0 commit comments

Comments
 (0)