diff --git a/init.php b/init.php index d57eba6..b89a0fe 100644 --- a/init.php +++ b/init.php @@ -9,7 +9,8 @@ set_error_handler(function ($level, $message, $file = '', $line = 0) { }); set_exception_handler(function ($e) { error_log((string) $e); - http_response_code(500); + if (http_response_code() !== false) + http_response_code(500); echo '
An error occured.
' . LF; }); register_shutdown_function(function () { // Also catch fatal errors