Skip to content

Commit 7f53d12

Browse files
1. 修复获取access_token时出现的报错bug
1 parent ef47db4 commit 7f53d12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MiniProgram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getAccessTokenData()
5353
);
5454
$url = self::API_HOST . self::ACCESS_TOKEN_PATH . http_build_query($urlParamArr);
5555
$res = json_decode(Common::httpRequest($url), true);
56-
if ($res['errcode']) {
56+
if (isset($res['errcode']) && $res['errcode']) {
5757
return '';
5858
} else {
5959
return $res;

0 commit comments

Comments
 (0)