This commit is contained in:
2021-03-23 18:26:36 +08:00
parent ea4b0e9c1c
commit 6b42958c4a
+1 -2
View File
@@ -94,8 +94,7 @@ class Service extends Component
*/ */
public static function replace(Request $request, array $service): Request public static function replace(Request $request, array $service): Request
{ {
$body = $request->params->getBodyAndClear(); if (!is_array($body = $request->params->getBodyAndClear())) {
if (is_null($serialize = Json::decode($body))) {
throw new Exception('Protocol format error.'); throw new Exception('Protocol format error.');
} }
if (!isset($serialize['cmd'])) { if (!isset($serialize['cmd'])) {