diff --git a/library/think/Request.php b/library/think/Request.php index 6e032c21..3aff5d89 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -410,8 +410,7 @@ class Request */ public function method() { - $method = isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']; - return IS_CLI ? 'GET' : $method; + return IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']); } /**