From 6dd685eefb48bbdc5a13a1d48fa8a456b236a19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 8 May 2021 11:06:26 +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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HttpServer/Http/HttpParams.php b/HttpServer/Http/HttpParams.php index a83792fb..7eecba10 100644 --- a/HttpServer/Http/HttpParams.php +++ b/HttpServer/Http/HttpParams.php @@ -13,6 +13,7 @@ use Exception; use HttpServer\Exception\RequestException; use JetBrains\PhpStorm\Pure; use ReflectionException; +use Snowflake\Core\Help; use Snowflake\Core\Json; use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake; @@ -207,6 +208,9 @@ class HttpParams */ #[Pure] public function load(): array { + if (is_string($this->body)){ + $this->body = Help::toArray($this->body); + } return array_merge($this->files ?? [], $this->body ?? [], $this->gets ?? [], $this->socket ?? []); }