diff --git a/Bootstraps/Symfony.php b/Bootstraps/Symfony.php index 0a742a7..09b49e2 100644 --- a/Bootstraps/Symfony.php +++ b/Bootstraps/Symfony.php @@ -111,6 +111,13 @@ public function postHandle($app) { $container = $app->getContainer(); + if ($container->has('doctrine')) { + $em = $container->get("doctrine"); + if (!$em->getManager()->isOpen()) { + $em->resetManager(); + } + } + //resets stopwatch, so it can correctly calculate the execution time if ($container->has('debug.stopwatch')) { $container->get('debug.stopwatch')->__construct();