Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 869e68d

Browse files
committed
bug #22144 [Console] Fixed fatal error when the command is not defined (lyrixx)
This PR was merged into the 3.3-dev branch. Discussion ---------- [Console] Fixed fatal error when the command is not defined | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | https://github.com/symfony/symfony/pull/18140/files#r107871406 | License | MIT | Doc PR | Commits ------- d5b41b6 [Console] Fixed fatal error when the command is not defined
2 parents eda821a + d5b41b6 commit 869e68d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null
127127
$exception = new FatalThrowableError($e);
128128
}
129129

130-
if (null !== $e && null !== $this->dispatcher) {
130+
if (null !== $this->runningCommand && null !== $e && null !== $this->dispatcher) {
131131
$event = new ConsoleErrorEvent($this->runningCommand, $input, $output, $e, $e->getCode());
132132
$this->dispatcher->dispatch(ConsoleEvents::ERROR, $event);
133133

0 commit comments

Comments
 (0)