From 59498620a091e1b41efd0f6dcebb48037b44c696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Jul 2021 18:51:11 +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/Http/Response.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index 2c5f871e..8c1f6b13 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -276,9 +276,8 @@ class Response extends HttpService */ public static function create($response = null): static { + Context::setContext('response', $response); $ciResponse = Snowflake::getDi()->get(Response::class); - Context::setContext('response', $ciResponse); - $ciResponse->response = $response; $ciResponse->startTime = microtime(true); $ciResponse->format = self::JSON; return $ciResponse;