-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
当用户信息有 " 字符时系统出错 (用户与用户组管理接口) #107
Comments
微信的接口团队真的是吃屎的 |
同感 |
已发微博点名批评 😆 |
有同样的错误,替换上面的还是会报错 = = |
@narutooturan 能不能把返回的json原样取一份发我,用gist |
@overtrue 发到您的邮箱了。 |
持续关注 |
现在的做法是在User.php line 103前重新验证下是否为数组,如果不是重新用一下json_decode。这样是没有报错了,但是跑了一会儿之后经常会返回错误,不知道为什么 = = |
@overtrue 我记得这个错误 我提交过呀!!! 你也都合并了 |
overtrue
added a commit
that referenced
this issue
Jan 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$userService->batchGet($openId); 批量获取用户信息
在调用此接口时,如果用户信息中带有 " 则会json解析错误,具体错误信息如下
ErrorException in User.php line 93:
Illegal string offset 'user_info_list'
问题主要是
https://github.com/overtrue/wechat/blob/2.1/src/Wechat/Http.php#L103
此段没有将文本中的"替换
我是直接改成了
$contents = json_decode(substr(str_replace(array('\\\"','"', '\\'), array('','"', ''), json_encode($response['data'])), 1, -1), true);
虽然成功了,但是却把 " 删除了,希望有更好的解决方案,望指正!
The text was updated successfully, but these errors were encountered: