From 4db46a65ec173c34d14db979210bf9931fec84f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 15 Dec 2020 17:18:37 +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/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HttpServer/Controller.php b/HttpServer/Controller.php index dae71db0..6492d66d 100644 --- a/HttpServer/Controller.php +++ b/HttpServer/Controller.php @@ -112,7 +112,7 @@ class Controller extends Application */ public function getHeaders(): ?HttpHeaders { - if (!$this->headers) { + if (!$this->headers && $this->getRequest()) { $this->headers = $this->getRequest()->headers; } return $this->headers;