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;