Skip to content

Commit

Permalink
[TwigBundle] always load the exception listener if the templating.eng…
Browse files Browse the repository at this point in the history
…ines is not present
  • Loading branch information
fabpot committed Jan 4, 2015
1 parent 59f3751 commit 30ba9df
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -28,9 +28,11 @@ public function process(ContainerBuilder $container)
}

// register the exception controller only if Twig is enabled
$engines = $container->getParameter('templating.engines');
if (!in_array('twig', $engines)) {
$container->removeDefinition('twig.exception_listener');
if ($container->hasParameter('templating.engines')) {
$engines = $container->getParameter('templating.engines');
if (!in_array('twig', $engines)) {
$container->removeDefinition('twig.exception_listener');
}
}
}
}

0 comments on commit 30ba9df

Please sign in to comment.