Skip to content

Commit d308e2c

Browse files
committed
bug symfony#52434 [Console][FrameworkBundle] Fix missing profile option for console commands (keulinho)
This PR was merged into the 6.4 branch. Discussion ---------- [Console][FrameworkBundle] Fix missing `profile` option for console commands | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix symfony#52433 | License | MIT Commits ------- 0e0848b Fix missing `profile` option for console commands
2 parents 003843d + 0e0848b commit d308e2c

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)