Ensure proper exit code for exceptions & errors (fixes #4336)

This commit is contained in:
Sam Minnee 2015-07-17 23:26:43 +01:00
parent 271f64e9b2
commit a0003825ad

View File

@ -531,7 +531,8 @@ function exceptionHandler($exception) {
$file = $exception->getFile(); $file = $exception->getFile();
$line = $exception->getLine(); $line = $exception->getLine();
$context = $exception->getTrace(); $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_ERROR:
case E_CORE_ERROR: case E_CORE_ERROR:
case E_USER_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_WARNING:
case E_CORE_WARNING: case E_CORE_WARNING: