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; }