From 2e35cf1cb04e5c0fe1472697beb57485574e6ebe Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 14 Jun 2016 10:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BResponse=E7=B1=BB=E7=9A=84get?= =?UTF-8?q?Code=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Response.php b/library/think/Response.php index be92774d..c986e5a8 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -349,6 +349,6 @@ class Response */ public function getCode() { - return $this->header['status']; + return isset($this->header['status']) ? $this->header['status'] : 200; } }