From 565222cfeaf9801103e0683adf13a4d920378597 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 21 Dec 2016 18:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRequest=E7=B1=BB=E7=9A=84post?= =?UTF-8?q?=E5=92=8Cput=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index 9cd4ccf1..cbf294ce 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -691,7 +691,7 @@ class Request if (empty($this->post)) { $content = $this->input; if (empty($_POST) && strpos($content, '":')) { - $this->post = json_decode($content, true); + $this->post = (array) json_decode($content, true); } else { $this->post = $_POST; } @@ -716,7 +716,7 @@ class Request if (is_null($this->put)) { $content = $this->input; if (strpos($content, '":')) { - $this->put = json_decode($content, true); + $this->put = (array) json_decode($content, true); } else { parse_str($content, $this->put); }