From 7c1b587eb9986ab725031b8b4932b9b54cf05d82 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 11 Jan 2019 14:46:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/think/Request.php b/library/think/Request.php index eac0237f..47356ecd 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -526,6 +526,8 @@ class Request if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) { $this->method = $method; $this->{$this->method}($_POST); + } else { + $this->method = 'POST'; } } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { $this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);