[Console] Fixed fatal error when the command is not defined
This commit is contained in:
parent
2ad59231c6
commit
d5b41b6b0a
@ -127,7 +127,7 @@ class Application
|
||||
$exception = new FatalThrowableError($e);
|
||||
}
|
||||
|
||||
if (null !== $e && null !== $this->dispatcher) {
|
||||
if (null !== $this->runningCommand && null !== $e && null !== $this->dispatcher) {
|
||||
$event = new ConsoleErrorEvent($this->runningCommand, $input, $output, $e, $e->getCode());
|
||||
$this->dispatcher->dispatch(ConsoleEvents::ERROR, $event);
|
||||
|
||||
|
Reference in New Issue
Block a user