From 1d453606d3f0f9626a6da7ba82c7b777265558f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 12 Nov 2022 17:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- We.php | 2 +- WeMini/crypt/wxBizDataCrypt.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/We.php b/We.php index 2a186a2..97b2017 100644 --- a/We.php +++ b/We.php @@ -91,7 +91,7 @@ class We * 定义当前版本 * @var string */ - const VERSION = '1.2.36'; + const VERSION = '1.2.37'; /** * 静态配置 diff --git a/WeMini/crypt/wxBizDataCrypt.php b/WeMini/crypt/wxBizDataCrypt.php index fe54814..abc80ab 100644 --- a/WeMini/crypt/wxBizDataCrypt.php +++ b/WeMini/crypt/wxBizDataCrypt.php @@ -46,7 +46,8 @@ class WXBizDataCrypt if ($dataObj == null) { return ErrorCode::$IllegalBuffer; } - if ($dataObj->watermark->appid != $this->appid) { + // 兼容新版本无 watermark 的情况 + if (isset($dataObj->watermark) && $dataObj->watermark->appid != $this->appid) { return ErrorCode::$IllegalBuffer; } $data = $result;