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'])) {