From 4c16868576f4dcf5d9d4072c6e9eef82d18ca2c9 Mon Sep 17 00:00:00 2001 From: "Zhang Tianxiang(Coder)" <925916153@qq.com> Date: Thu, 21 Jun 2018 10:39:12 +0800 Subject: [PATCH] fix checkAuth bug json always contains the errcode: 0 for success --- qywechat.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qywechat.class.php b/qywechat.class.php index 76c71832..28d6d546 100644 --- a/qywechat.class.php +++ b/qywechat.class.php @@ -890,7 +890,7 @@ public function checkAuth($appid='',$appsecret='',$token=''){ if ($result) { $json = json_decode($result,true); - if (!$json || isset($json['errcode'])) { + if (!$json || $json['errcode']) { $this->errCode = $json['errcode']; $this->errMsg = $json['errmsg']; return false;