From 5ed15afe1fc82385c349c22a085a7916db8a88f3 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 26 Jan 2022 23:58:25 +0100 Subject: [PATCH] Use constant for HTTP response code --- classes/ErrorHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/ErrorHandler.php b/classes/ErrorHandler.php index ec52bbc..f8dd60a 100644 --- a/classes/ErrorHandler.php +++ b/classes/ErrorHandler.php @@ -2,6 +2,7 @@ namespace Alltube; +use Slim\Http\StatusCode; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Throwable; @@ -29,7 +30,7 @@ class ErrorHandler http_response_code($exception->getStatusCode()); die($exception->getAsString()); } else { - http_response_code(500); + http_response_code(StatusCode::HTTP_INTERNAL_SERVER_ERROR); die('Error when starting the app: ' . htmlentities($e->getMessage())); } }