Set HTTP reponse code to 500 on FATAL error

This commit is contained in:
Benjamin Renard 2020-11-30 10:47:09 +01:00
parent a80208adc0
commit 47a1d09e54

View file

@ -170,6 +170,9 @@ function fatal_error($error) {
if (php_sapi_name() == "cli")
die("FATAL ERROR : $error\n");
// Set HTTP reponse code to 500
http_response_code(500);
if ($ajax)
display_ajax_return(array('error' => $error));