{"action":"opened","issue":{"url":"https://api.github.com/repos/overtrue/wechat/issues/107","labels_url":"https://api.github.com/repos/overtrue/wechat/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/overtrue/wechat/issues/107/comments","events_url":"https://api.github.com/repos/overtrue/wechat/issues/107/events","html_url":"https://github.com/overtrue/wechat/issues/107","id":106919546,"number":107,"title":"当用户信息有 \" 字符时系统出错 (用户与用户组管理接口)","user":{"login":"enbaby","id":6469472,"avatar_url":"https://avatars.githubusercontent.com/u/6469472?v=3","gravatar_id":"","url":"https://api.github.com/users/enbaby","html_url":"https://github.com/enbaby","followers_url":"https://api.github.com/users/enbaby/followers","following_url":"https://api.github.com/users/enbaby/following{/other_user}","gists_url":"https://api.github.com/users/enbaby/gists{/gist_id}","starred_url":"https://api.github.com/users/enbaby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enbaby/subscriptions","organizations_url":"https://api.github.com/users/enbaby/orgs","repos_url":"https://api.github.com/users/enbaby/repos","events_url":"https://api.github.com/users/enbaby/events{/privacy}","received_events_url":"https://api.github.com/users/enbaby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-17T06:25:50Z","updated_at":"2015-09-17T06:25:50Z","closed_at":null,"body":"$userService->batchGet($openId); 批量获取用户信息\r\n\r\n在调用此接口时，如果用户信息中带有 \" 则会json解析错误，具体错误信息如下\r\nErrorException in User.php line 93:\r\nIllegal string offset 'user_info_list'\r\n\r\n问题主要是\r\nhttps://github.com/overtrue/wechat/blob/2.1/src/Wechat/Http.php#L103\r\n\r\n此段没有将文本中的\"替换\r\n\r\n我是直接改成了\r\n$contents = json_decode(substr(str_replace(array('\\\\\\\\\\\\\"','\\\"', '\\\\\\\\'), array('','\"', ''), json_encode($response['data'])), 1, -1), true);\r\n\r\n虽然成功了，但是却把 \" 删除了，希望有更好的解决方案，望指正！"}}