From 23e997defd505de09860f57dc1cc17ae1f2caaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 9 Sep 2020 20:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnRequest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index b59abb59..c61f45f4 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -42,10 +42,11 @@ class OnRequest extends Callback return; } $types = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR]; - if (in_array($error['type'], $types)) { - $response->status(500); - $response->end($error['message']); + if (!in_array($error['type'], $types)) { + return; } + $response->status(500); + $response->end($error['message']); }); /** @var HRequest $sRequest */ [$sRequest, $sResponse] = static::setContext($request, $response);