Skip to content

Commit 0e0848b

Browse files
authored
Fix missing profile option for console commands
Fixes symfony#52433
1 parent 8a69f67 commit 0e0848b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public static function getSubscribedEvents(): array
5959

6060
public function initialize(ConsoleCommandEvent $event): void
6161
{
62-
if (!$event->getInput()->getOption('profile')) {
62+
$input = $event->getInput();
63+
if (!$input->hasOption('profile') || !$input->getOption('profile')) {
6364
$this->profiler->disable();
6465

6566
return;

0 commit comments

Comments
 (0)