Merge pull request #4412 from sminnee/4336-error-exit-code

Ensure proper exit code for exceptions & errors (fixes #4336)
This commit is contained in:
Ingo Schommer 2015-07-18 11:46:13 +12:00
commit 712d796c14

View File

@ -531,7 +531,8 @@ function exceptionHandler($exception) {
$file = $exception->getFile();
$line = $exception->getLine();
$context = $exception->getTrace();
return Debug::fatalHandler($errno, $message, $file, $line, $context);
Debug::fatalHandler($errno, $message, $file, $line, $context);
exit(1);
}
/**
@ -550,7 +551,8 @@ function errorHandler($errno, $errstr, $errfile, $errline) {
case E_ERROR:
case E_CORE_ERROR:
case E_USER_ERROR:
return Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
exit(1);
case E_WARNING:
case E_CORE_WARNING: