1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-25 02:51:35 +02:00

[ticket/15298] Makes sure CLI exceptions are never suppressed by Symfony

PHPBB3-15298
This commit is contained in:
Tristan Darricau
2017-09-10 12:43:38 +02:00
committed by Marc Alexander
parent 1306e63fd7
commit 77104bdc37

View File

@@ -52,6 +52,12 @@ class exception_subscriber implements EventSubscriberInterface
$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()