From 6b42958c4a5a15235c57132ee72f6027e5a75140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Mar 2021 18:26:36 +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 --- Rpc/Service.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rpc/Service.php b/Rpc/Service.php index 637d2060..8bf2a2b9 100644 --- a/Rpc/Service.php +++ b/Rpc/Service.php @@ -94,8 +94,7 @@ class Service extends Component */ public static function replace(Request $request, array $service): Request { - $body = $request->params->getBodyAndClear(); - if (is_null($serialize = Json::decode($body))) { + if (!is_array($body = $request->params->getBodyAndClear())) { throw new Exception('Protocol format error.'); } if (!isset($serialize['cmd'])) {