openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c91de7d4046993bdae6b5767be985b4f629e28b7
parent 8fe969568fd5275e4d05f66a186618a38b00090c
Author: Jan Dankert <devnull@localhost>
Date:   Sun,  9 Dec 2018 23:33:51 +0100

Bei API-Fehlern auch Status 500 setzen

Diffstat:
api/index.php | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/api/index.php b/api/index.php @@ -13,8 +13,10 @@ try { } catch (Exception $e) { - echo $e->__toString(); + if (!headers_sent()) + header('HTTP/1.0 500 Internal Server Error'); + echo $e->__toString(); }