[TwigBundle] always load the exception listener if the templating.engines is not present
This commit is contained in:
parent
59f3751052
commit
30ba9df07c
@ -28,9 +28,11 @@ class ExceptionListenerPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user