From 1301d812581de56924ddd0158482dc603b1d3e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8B=97?= <794329728@qq.com> Date: Mon, 23 Aug 2021 15:37:54 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E8=8E=B7=E5=8F=96=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E5=B8=96=E5=A4=B1=E8=B4=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/Dynamic.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugin/Dynamic.php b/src/plugin/Dynamic.php index 6fa868b..7cd5b6f 100644 --- a/src/plugin/Dynamic.php +++ b/src/plugin/Dynamic.php @@ -49,6 +49,10 @@ class Dynamic $url = 'https://api.vc.bilibili.com/topic_svr/v1/topic_svr/topic_new?topic_id=' . $t_id; $data = Curl::request('get', $url); $data = json_decode($data, true); + if (!isset($data['data'])) { + Log::warning("获取抽奖贴失败: {$data['message']}"); + continue; + } // new foreach ($data['data']['cards'] as $article) {