Skip to content

Commit 855e836

Browse files
committed
only load console profiling if console is actually available
this fixes a regression introduced in ea5a3cc
1 parent 120a6ab commit 855e836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
10781078
$container->getDefinition('profiler_listener')
10791079
->addArgument($config['collect_parameter']);
10801080

1081-
if (!$container->getParameter('kernel.debug') || !class_exists(CliRequest::class) || !$container->has('debug.stopwatch')) {
1081+
if (!$container->getParameter('kernel.debug') || !$this->hasConsole() || !class_exists(CliRequest::class) || !$container->has('debug.stopwatch')) {
10821082
$container->removeDefinition('console_profiler_listener');
10831083
}
10841084

0 commit comments

Comments
 (0)