{"action":"created","issue":{"url":"https://api.github.com/repos/overtrue/wechat/issues/13","labels_url":"https://api.github.com/repos/overtrue/wechat/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/overtrue/wechat/issues/13/comments","events_url":"https://api.github.com/repos/overtrue/wechat/issues/13/events","html_url":"https://github.com/overtrue/wechat/issues/13","id":73044452,"number":13,"title":" 素材管理 -- 部分图片下载失败","user":{"login":"lazyou","id":2617574,"avatar_url":"https://avatars.githubusercontent.com/u/2617574?v=3","gravatar_id":"","url":"https://api.github.com/users/lazyou","html_url":"https://github.com/lazyou","followers_url":"https://api.github.com/users/lazyou/followers","following_url":"https://api.github.com/users/lazyou/following{/other_user}","gists_url":"https://api.github.com/users/lazyou/gists{/gist_id}","starred_url":"https://api.github.com/users/lazyou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazyou/subscriptions","organizations_url":"https://api.github.com/users/lazyou/orgs","repos_url":"https://api.github.com/users/lazyou/repos","events_url":"https://api.github.com/users/lazyou/events{/privacy}","received_events_url":"https://api.github.com/users/lazyou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-04T15:04:55Z","updated_at":"2015-05-05T01:47:32Z","closed_at":null,"body":"下载图片出现如下错误 ： \r\n\r\n\r\n有的图片能下载，有的图片不能下载的情况。\r\n错误如下：\r\n<code>\r\n[2015-05-04 10:47:47] local.ERROR: exception 'ErrorException' with message 'Undefined offset: 1' in /var/www/meishenghuo/web/vendor/overtrue/wechat/src/Wechat/Utils/Http.php:228\r\n<code/>\r\n\r\n我的解决方法如下，但是不知道这样做对不（能解决部分图片不能下载问题）。\r\n\r\nWechat\\Utils\\Http.php的 request() 方法下 ：\r\n\r\n <code>$responseSplit = preg_split('/((?:\\r?\\n){2})/', $response['response']); </code>\r\n\r\n正则分割 header和 body的时候出现了 body被拆分成两部分的情况(本该是 \r\n <p><code>$responseSplit = array(0=>\"header信息\"， 1=>\"body信息\"); </code> </p>\r\n结果变成 \r\n <p> <code>$responseSplit = array(0=>\"header信息\", 1=>\"body1信息\", 2=>\"body2信息\"); </code>\r\n)。 </p>\r\n我把正则内的 \\r 后面的 ? 问号去掉就能解决问题（不懂为什么）。\r\n\r\n <code> $responseSplit = preg_split('/((?:\\r\\n){2})/', $response['response']); </code>"},"comment":{"url":"https://api.github.com/repos/overtrue/wechat/issues/comments/98902956","html_url":"https://github.com/overtrue/wechat/issues/13#issuecomment-98902956","issue_url":"https://api.github.com/repos/overtrue/wechat/issues/13","id":98902956,"user":{"login":"overtrue","id":1472352,"avatar_url":"https://avatars.githubusercontent.com/u/1472352?v=3","gravatar_id":"","url":"https://api.github.com/users/overtrue","html_url":"https://github.com/overtrue","followers_url":"https://api.github.com/users/overtrue/followers","following_url":"https://api.github.com/users/overtrue/following{/other_user}","gists_url":"https://api.github.com/users/overtrue/gists{/gist_id}","starred_url":"https://api.github.com/users/overtrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overtrue/subscriptions","organizations_url":"https://api.github.com/users/overtrue/orgs","repos_url":"https://api.github.com/users/overtrue/repos","events_url":"https://api.github.com/users/overtrue/events{/privacy}","received_events_url":"https://api.github.com/users/overtrue/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T01:47:32Z","updated_at":"2015-05-05T01:47:32Z","body":"@lazyou 麻烦加一下QQ: 44294631"}}