Commit 2d631213 authored by 杨培's avatar 杨培

修复服务端返回数据不是数组时报错的问题

parent 6e80b26e
......@@ -110,7 +110,7 @@ class Client
$data = @json_decode($response, true);
if (!is_array($data)) {
if (json_last_error() !== JSON_ERROR_NONE) {
throw new ClientException('接口返回数据异常: ' . $response);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment