From b2f1d051fc50ac451c264d687ca1b707589907bc Mon Sep 17 00:00:00 2001 From: Dag Date: Sun, 8 May 2022 03:57:46 +0200 Subject: [PATCH] fix: don't bork upstream with http status code -1 (#2690) --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 87c4c546..f0d5bd43 100644 --- a/index.php +++ b/index.php @@ -28,6 +28,9 @@ try { } } catch(\Exception $e) { error_log($e); - header('Content-Type: text/plain', true, $e->getCode()); + $code = $e->getCode(); + if ($code !== -1) { + header('Content-Type: text/plain', true, $code); + } die($e->getMessage()); }