mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Ensure proper exit code for exceptions & errors (fixes #4336)
This commit is contained in:
parent
271f64e9b2
commit
a0003825ad
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user