From 47a1d09e54f52460566d6d0a5d56d082b78c0bf7 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 30 Nov 2020 10:47:09 +0100 Subject: [PATCH] Set HTTP reponse code to 500 on FATAL error --- includes/smarty.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/smarty.php b/includes/smarty.php index 30d0ad6..8e89451 100644 --- a/includes/smarty.php +++ b/includes/smarty.php @@ -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));