-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改“根据code获取成员信息",获取成功后,显示'$json['error']未定义'错误 #347
Open
spristar
wants to merge
18
commits into
develop
Choose a base branch
from
master
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
增加小视频类型,其他函数无影响
add shortvideo type
修正上传在摇一摇页面展示的图片素材接口地址错误的bug
fix media upload bug
修正5.6+curl去掉的@
发现无法上传bug!
企业号升级为企业微信,返回有变化
FIX "Function mcrypt_module_open() is deprecated in PHP 7.1"
fix variable
Update wechat.class.php
使用官方的json_encode
Update wechat.class.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
if (!$agentid) $agentid=$this->agentid;
if (!$this->access_token && !$this->checkAuth()) return false;
$result = $this->http_get(self::API_URL_PREFIX.self::USER_GETINFO_URL.'access_token='.$this->access_token.'&code='.$code.'&agentid='.$agentid);
if ($result)
{
$json = json_decode($result,true);
//if (!$json || !empty($json['errcode']) || $json['errcode']!=0) {// change it to the below
if (isset($json['errcode'])) {//主要修改这里,将上一行修改如左侧代码
/*
*无论怎样,微信服务器端都会返回信息,也即!$json 总是为真
*但是,当用正确的code时,微信服务器回复的信息里并无$json['errcode']这一项
*这样导致"或"判断时,会出现$json['errcode']未定义错误
* 修改之后则不会了,会更加准确的判断服务器回复内容,便于后续处理
*/
$this->errCode = $json['errcode'];
$this->errMsg = $json['errmsg'];
return false;
}
return $json;
}
return false;
}