From 66f35513c21b513c667c9fb7546ca33fc5db6300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 30 Oct 2020 01:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Http/HttpParams.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HttpServer/Http/HttpParams.php b/HttpServer/Http/HttpParams.php index 68bc32a8..22a8cf74 100644 --- a/HttpServer/Http/HttpParams.php +++ b/HttpServer/Http/HttpParams.php @@ -6,6 +6,7 @@ * Time: 14:54 */ declare(strict_types=1); + namespace HttpServer\Http; use Exception; @@ -38,13 +39,13 @@ class HttpParams */ public function __construct($body, $get, $files) { - $this->body = $body; $this->gets = $get ?? []; $this->files = $files ?? []; if (!is_array($this->body)) { $this->body = Help::toArray($this->body); + } else { + $this->body = $body; } - } /**