Skip to content

Commit

Permalink
fatalErrorHandler returns 500 only on fatal errors
Browse files Browse the repository at this point in the history
fatalogErrorHandler should return 500 only on fatal errors - otherwise, even a simple deprecation warning on the page triggers internal server error, which is invalid.
  • Loading branch information
WEXO team authored Apr 8, 2019
1 parent 5791131 commit 9675984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pub/health_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
function fatalErrorHandler()
{
$error = error_get_last();
if ($error !== null) {
if ($error !== null && $error['type'] === E_ERROR) {
http_response_code(500);
}
}

0 comments on commit 9675984

Please sign in to comment.