diff options
| author | Simon Rettberg | 2025-05-09 14:55:44 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-05-09 14:55:44 +0200 |
| commit | 66946ca799ca10489c4f41c499515d0df4633129 (patch) | |
| tree | 76ca04c4a360d683309f193badb8ad882c5cac10 /inc/errorhandler.inc.php | |
| parent | [rebootcontrol] POST -> GET for fetching client status via AJAX (diff) | |
| download | slx-admin-66946ca799ca10489c4f41c499515d0df4633129.tar.gz slx-admin-66946ca799ca10489c4f41c499515d0df4633129.tar.xz slx-admin-66946ca799ca10489c4f41c499515d0df4633129.zip | |
Use http_response_code() instead of header(), add a few missing repsonse codes
Diffstat (limited to 'inc/errorhandler.inc.php')
| -rw-r--r-- | inc/errorhandler.inc.php | 2 |
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()); |
