From c506bbcb8bfb801efc771c39aa85115ea41ec745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Mar 2021 16:56:53 +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/Client.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rpc/Client.php b/Rpc/Client.php index 60187153..af06d124 100644 --- a/Rpc/Client.php +++ b/Rpc/Client.php @@ -51,7 +51,11 @@ class Client extends Component if ($isSend === false) { return $this->addError($this->client->errMsg . '(' . $this->client->errCode . ')'); } - return unserialize($this->client->recv()); + + if (is_bool($unpack = unserialize($this->client->recv()))) { + return $this->addError('Service return data format error(500)'); + } + return $unpack; }