Set HTTP reponse code to 500 on FATAL error
This commit is contained in:
parent
a80208adc0
commit
47a1d09e54
1 changed files with 3 additions and 0 deletions
|
@ -170,6 +170,9 @@ function fatal_error($error) {
|
||||||
if (php_sapi_name() == "cli")
|
if (php_sapi_name() == "cli")
|
||||||
die("FATAL ERROR : $error\n");
|
die("FATAL ERROR : $error\n");
|
||||||
|
|
||||||
|
// Set HTTP reponse code to 500
|
||||||
|
http_response_code(500);
|
||||||
|
|
||||||
if ($ajax)
|
if ($ajax)
|
||||||
display_ajax_return(array('error' => $error));
|
display_ajax_return(array('error' => $error));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue