From 2e6208a8e378ac34b29bfcb06b74794773c668f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 14 Apr 2021 17:00:50 +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/Client/ClientAbstracts.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/HttpServer/Client/ClientAbstracts.php b/HttpServer/Client/ClientAbstracts.php index ae9c39eb..c714ff36 100644 --- a/HttpServer/Client/ClientAbstracts.php +++ b/HttpServer/Client/ClientAbstracts.php @@ -5,12 +5,9 @@ namespace HttpServer\Client; use Closure; -use Exception; - use JetBrains\PhpStorm\Pure; use Snowflake\Abstracts\Component; use Snowflake\Core\Help; -use Snowflake\Core\Json; use Swoole\Coroutine\System; @@ -534,18 +531,10 @@ abstract class ClientAbstracts extends Component implements IClient */ protected function mergeParams($newData): string { - if (empty($this->getData())) { + if (!is_string($newData)) { return $this->toRequest($newData); - } else if (empty($newData)) { - return $this->toRequest($this->getData()); } - - $newData = Help::toArray($newData); - $array = Help::toArray($this->getData()); - - $params = array_merge($array, $newData); - - return $this->toRequest($params); + return $newData; }