mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #4951 from Nicofuma/ticket/15357-master
[ticket/15298] Makes sure CLI exceptions are never suppressed by Symfony
This commit is contained in:
commit
6d98f53780
1 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,12 @@ class exception_subscriber implements EventSubscriberInterface
|
||||||
|
|
||||||
$event->setError($exception);
|
$event->setError($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the exception has an exit code of 0, Symfony will suppress it by default which we don't want
|
||||||
|
if ($event->getExitCode() === 0 && $original_exception->getCode() === 0)
|
||||||
|
{
|
||||||
|
$event->setExitCode(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getSubscribedEvents()
|
static public function getSubscribedEvents()
|
||||||
|
|
Loading…
Add table
Reference in a new issue