From 7917d32ec945025470a038cfaa75e8bf289f706f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Dec 2020 17:20:51 +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/Route/Dispatch/Dispatch.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HttpServer/Route/Dispatch/Dispatch.php b/HttpServer/Route/Dispatch/Dispatch.php index 4313da72..25213747 100644 --- a/HttpServer/Route/Dispatch/Dispatch.php +++ b/HttpServer/Route/Dispatch/Dispatch.php @@ -65,11 +65,11 @@ class Dispatch * @param $controller * @return mixed */ - protected function bindRequest($controller) + protected function bindRequest($controller): mixed { $controller->request = Context::getContext('request'); - $controller->headers = $controller->request->headers; - $controller->input = $controller->request->params; + $controller->headers = $controller->request?->headers; + $controller->input = $controller->request?->params; return $controller; }