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; } }