From 6c1e4dbbaed1df0aaffffbcda99f28cd79fa7135 Mon Sep 17 00:00:00 2001 From: whwyy Date: Thu, 23 Nov 2023 13:54:13 +0800 Subject: [PATCH] eee --- common/Multiprogramming.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/Multiprogramming.php b/common/Multiprogramming.php index 056c0aa..9bae597 100644 --- a/common/Multiprogramming.php +++ b/common/Multiprogramming.php @@ -151,10 +151,10 @@ abstract class Multiprogramming implements Progaram return new Result(code: 505, message: $client->getBody()); } $body = json_decode($client->getBody(), true); - if (!is_null($body)) { + if (is_null($body) || (isset($body['errcode']) && $body['errcode'] != 0)) { return new Result(code: $body['errcode'], message: $body['errmsg']); } else { - return new Result(code: 0, data: $client->getBody()); + return new Result(code: 0, data: $body); } }