Skip to content

Commit 23ab519

Browse files
dnnaandig
authored andcommitted
Reset doctrine object manager if closed (#121)
1 parent 08ff742 commit 23ab519

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Bootstraps/Symfony.php

+7
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ public function postHandle($app)
111111
{
112112
$container = $app->getContainer();
113113

114+
if ($container->has('doctrine')) {
115+
$em = $container->get("doctrine");
116+
if (!$em->getManager()->isOpen()) {
117+
$em->resetManager();
118+
}
119+
}
120+
114121
//resets stopwatch, so it can correctly calculate the execution time
115122
if ($container->has('debug.stopwatch')) {
116123
$container->get('debug.stopwatch')->__construct();

0 commit comments

Comments
 (0)