summaryrefslogtreecommitdiffstats
path: root/inc/errorhandler.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/errorhandler.inc.php')
-rw-r--r--inc/errorhandler.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/errorhandler.inc.php b/inc/errorhandler.inc.php
index ce969966..5a1912cd 100644
--- a/inc/errorhandler.inc.php
+++ b/inc/errorhandler.inc.php
@@ -25,7 +25,7 @@ class ErrorHandler
// Don't spam HTML when invoked via cli, above error_log should have gone to stdout/stderr
exit(1);
}
- Header('HTTP/1.1 500 Internal Server Error');
+ http_response_code(500);
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'html') === false) {
Header('Content-Type: text/plain; charset=utf-8');
echo 'API ERROR: ', $message, "\n", self::formatBacktracePlain(debug_backtrace());