From e6f8fe54819e85ced37340ff0e9fc36f3aa672a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Tue, 18 Oct 2022 17:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E5=9B=BE=E6=96=87=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/wechat/WechatReplyServices.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crmeb/app/services/wechat/WechatReplyServices.php b/crmeb/app/services/wechat/WechatReplyServices.php index 1887e8b2c..5c37d7f35 100644 --- a/crmeb/app/services/wechat/WechatReplyServices.php +++ b/crmeb/app/services/wechat/WechatReplyServices.php @@ -103,7 +103,7 @@ class WechatReplyServices extends BaseServices if ($id == 'undefined') { $id = 0; } - if ($data['content'] == '' && $data['src'] == '') $data = $data['list'][0] ?? []; + if (isset($data['content']) && $data['content'] == '' && isset($data['src']) && $data['src'] == '') $data = $data['list'][0] ?? []; try { $res = $this->{$method}($data, $id); } catch (\Throwable $e) { @@ -292,6 +292,9 @@ class WechatReplyServices extends BaseServices */ public function tidyNews($data, $id = 0) { + if ($id != 0) { + $data = $data['list'][0]; + } if (!count($data)) { throw new AdminException(400709); }