Skip to content

Commit 9675984

Browse files
author
WEXO team
authored
fatalErrorHandler returns 500 only on fatal errors
fatalogErrorHandler should return 500 only on fatal errors - otherwise, even a simple deprecation warning on the page triggers internal server error, which is invalid.
1 parent 5791131 commit 9675984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pub/health_check.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
function fatalErrorHandler()
7171
{
7272
$error = error_get_last();
73-
if ($error !== null) {
73+
if ($error !== null && $error['type'] === E_ERROR) {
7474
http_response_code(500);
7575
}
7676
}

0 commit comments

Comments
 (0)