From 65e9fe3cea29bed1c80753920e98efbfbc2af4e8 Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Tue, 18 May 2021 18:02:30 +0800 Subject: [PATCH] [fix] Silver2Coin --- src/plugin/Notice.php | 1 + src/plugin/Silver2Coin.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugin/Notice.php b/src/plugin/Notice.php index 851dfd6..d63e5e2 100644 --- a/src/plugin/Notice.php +++ b/src/plugin/Notice.php @@ -47,6 +47,7 @@ class Notice $custom_words = explode(',', getConf('filter_words', 'notify')); $total_words = array_merge($default_words, $custom_words); foreach ($total_words as $word) { + if (empty($word)) continue; if (strpos($result, $word) !== false) { return true; } diff --git a/src/plugin/Silver2Coin.php b/src/plugin/Silver2Coin.php index 9158e27..f7a81f8 100644 --- a/src/plugin/Silver2Coin.php +++ b/src/plugin/Silver2Coin.php @@ -65,11 +65,11 @@ class Silver2Coin /** * @use 处理结果 - * @param int $type + * @param string $type * @param array $data * @return bool */ - private static function handle(int $type, array $data): bool + private static function handle(string $type, array $data): bool { // {"code":403,"msg":"每天最多能兑换 1 个","message":"每天最多能兑换 1 个","data":[]} // {"code":403,"msg":"仅主站正式会员以上的用户可以兑换","message":"仅主站正式会员以上的用户可以兑换","data":[]}