{"action":"closed","number":60,"pull_request":{"url":"https://api.github.com/repos/segmentio/analytics-php/pulls/60","id":53724219,"html_url":"https://github.com/segmentio/analytics-php/pull/60","diff_url":"https://github.com/segmentio/analytics-php/pull/60.diff","patch_url":"https://github.com/segmentio/analytics-php/pull/60.patch","issue_url":"https://api.github.com/repos/segmentio/analytics-php/issues/60","number":60,"state":"closed","locked":false,"title":"socket open error checking fix","user":{"login":"smatyas","id":534550,"avatar_url":"https://avatars.githubusercontent.com/u/534550?v=3","gravatar_id":"","url":"https://api.github.com/users/smatyas","html_url":"https://github.com/smatyas","followers_url":"https://api.github.com/users/smatyas/followers","following_url":"https://api.github.com/users/smatyas/following{/other_user}","gists_url":"https://api.github.com/users/smatyas/gists{/gist_id}","starred_url":"https://api.github.com/users/smatyas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smatyas/subscriptions","organizations_url":"https://api.github.com/users/smatyas/orgs","repos_url":"https://api.github.com/users/smatyas/repos","events_url":"https://api.github.com/users/smatyas/events{/privacy}","received_events_url":"https://api.github.com/users/smatyas/received_events","type":"User","site_admin":false},"body":"According to http://php.net/manual/en/function.fsockopen.php the `$errno` can equal to 0 in that case also, when the error occurred before the `connect()` call. The correct checking of the success of creating the socket is checking the function's return value. This can cause silent errors now.\r\nThis PR contains the fix along with a test for it.","created_at":"2015-12-15T16:11:39Z","updated_at":"2015-12-29T01:12:53Z","closed_at":"2015-12-29T01:12:53Z","merged_at":"2015-12-29T01:12:53Z","merge_commit_sha":"a1dcf877b7049e424d2504147c337d242b8519b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/analytics-php/pulls/60/commits","review_comments_url":"https://api.github.com/repos/segmentio/analytics-php/pulls/60/comments","review_comment_url":"https://api.github.com/repos/segmentio/analytics-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segmentio/analytics-php/issues/60/comments","statuses_url":"https://api.github.com/repos/segmentio/analytics-php/statuses/433ab299680f72c7adbc1c1eee751f00aed77300","head":{"label":"smatyas:socket-open-error-fix","ref":"socket-open-error-fix","sha":"433ab299680f72c7adbc1c1eee751f00aed77300","user":{"login":"smatyas","id":534550,"avatar_url":"https://avatars.githubusercontent.com/u/534550?v=3","gravatar_id":"","url":"https://api.github.com/users/smatyas","html_url":"https://github.com/smatyas","followers_url":"https://api.github.com/users/smatyas/followers","following_url":"https://api.github.com/users/smatyas/following{/other_user}","gists_url":"https://api.github.com/users/smatyas/gists{/gist_id}","starred_url":"https://api.github.com/users/smatyas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smatyas/subscriptions","organizations_url":"https://api.github.com/users/smatyas/orgs","repos_url":"https://api.github.com/users/smatyas/repos","events_url":"https://api.github.com/users/smatyas/events{/privacy}","received_events_url":"https://api.github.com/users/smatyas/received_events","type":"User","site_admin":false},"repo":{"id":48041316,"name":"analytics-php","full_name":"smatyas/analytics-php","owner":{"login":"smatyas","id":534550,"avatar_url":"https://avatars.githubusercontent.com/u/534550?v=3","gravatar_id":"","url":"https://api.github.com/users/smatyas","html_url":"https://github.com/smatyas","followers_url":"https://api.github.com/users/smatyas/followers","following_url":"https://api.github.com/users/smatyas/following{/other_user}","gists_url":"https://api.github.com/users/smatyas/gists{/gist_id}","starred_url":"https://api.github.com/users/smatyas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smatyas/subscriptions","organizations_url":"https://api.github.com/users/smatyas/orgs","repos_url":"https://api.github.com/users/smatyas/repos","events_url":"https://api.github.com/users/smatyas/events{/privacy}","received_events_url":"https://api.github.com/users/smatyas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smatyas/analytics-php","description":"The hassle-free way to integrate analytics into any php application.","fork":true,"url":"https://api.github.com/repos/smatyas/analytics-php","forks_url":"https://api.github.com/repos/smatyas/analytics-php/forks","keys_url":"https://api.github.com/repos/smatyas/analytics-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smatyas/analytics-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smatyas/analytics-php/teams","hooks_url":"https://api.github.com/repos/smatyas/analytics-php/hooks","issue_events_url":"https://api.github.com/repos/smatyas/analytics-php/issues/events{/number}","events_url":"https://api.github.com/repos/smatyas/analytics-php/events","assignees_url":"https://api.github.com/repos/smatyas/analytics-php/assignees{/user}","branches_url":"https://api.github.com/repos/smatyas/analytics-php/branches{/branch}","tags_url":"https://api.github.com/repos/smatyas/analytics-php/tags","blobs_url":"https://api.github.com/repos/smatyas/analytics-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smatyas/analytics-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smatyas/analytics-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/smatyas/analytics-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smatyas/analytics-php/statuses/{sha}","languages_url":"https://api.github.com/repos/smatyas/analytics-php/languages","stargazers_url":"https://api.github.com/repos/smatyas/analytics-php/stargazers","contributors_url":"https://api.github.com/repos/smatyas/analytics-php/contributors","subscribers_url":"https://api.github.com/repos/smatyas/analytics-php/subscribers","subscription_url":"https://api.github.com/repos/smatyas/analytics-php/subscription","commits_url":"https://api.github.com/repos/smatyas/analytics-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/smatyas/analytics-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/smatyas/analytics-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/smatyas/analytics-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/smatyas/analytics-php/contents/{+path}","compare_url":"https://api.github.com/repos/smatyas/analytics-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smatyas/analytics-php/merges","archive_url":"https://api.github.com/repos/smatyas/analytics-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smatyas/analytics-php/downloads","issues_url":"https://api.github.com/repos/smatyas/analytics-php/issues{/number}","pulls_url":"https://api.github.com/repos/smatyas/analytics-php/pulls{/number}","milestones_url":"https://api.github.com/repos/smatyas/analytics-php/milestones{/number}","notifications_url":"https://api.github.com/repos/smatyas/analytics-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smatyas/analytics-php/labels{/name}","releases_url":"https://api.github.com/repos/smatyas/analytics-php/releases{/id}","created_at":"2015-12-15T12:23:56Z","updated_at":"2015-12-15T12:23:56Z","pushed_at":"2015-12-15T16:20:40Z","git_url":"git://github.com/smatyas/analytics-php.git","ssh_url":"git@github.com:smatyas/analytics-php.git","clone_url":"https://github.com/smatyas/analytics-php.git","svn_url":"https://github.com/smatyas/analytics-php","homepage":"https://segment.com/libraries/php","size":145,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"segmentio:master","ref":"master","sha":"4a903a4ba2153155d5d7fe01ae0263b480d96c89","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":7763939,"name":"analytics-php","full_name":"segmentio/analytics-php","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/analytics-php","description":"The hassle-free way to integrate analytics into any php application.","fork":false,"url":"https://api.github.com/repos/segmentio/analytics-php","forks_url":"https://api.github.com/repos/segmentio/analytics-php/forks","keys_url":"https://api.github.com/repos/segmentio/analytics-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/analytics-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/analytics-php/teams","hooks_url":"https://api.github.com/repos/segmentio/analytics-php/hooks","issue_events_url":"https://api.github.com/repos/segmentio/analytics-php/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/analytics-php/events","assignees_url":"https://api.github.com/repos/segmentio/analytics-php/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/analytics-php/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/analytics-php/tags","blobs_url":"https://api.github.com/repos/segmentio/analytics-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/analytics-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/analytics-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/analytics-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/analytics-php/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/analytics-php/languages","stargazers_url":"https://api.github.com/repos/segmentio/analytics-php/stargazers","contributors_url":"https://api.github.com/repos/segmentio/analytics-php/contributors","subscribers_url":"https://api.github.com/repos/segmentio/analytics-php/subscribers","subscription_url":"https://api.github.com/repos/segmentio/analytics-php/subscription","commits_url":"https://api.github.com/repos/segmentio/analytics-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/analytics-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/analytics-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/analytics-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/analytics-php/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/analytics-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/analytics-php/merges","archive_url":"https://api.github.com/repos/segmentio/analytics-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/analytics-php/downloads","issues_url":"https://api.github.com/repos/segmentio/analytics-php/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/analytics-php/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/analytics-php/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/analytics-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/analytics-php/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/analytics-php/releases{/id}","created_at":"2013-01-22T23:41:14Z","updated_at":"2015-12-11T00:10:47Z","pushed_at":"2015-12-29T01:12:53Z","git_url":"git://github.com/segmentio/analytics-php.git","ssh_url":"git@github.com:segmentio/analytics-php.git","clone_url":"https://github.com/segmentio/analytics-php.git","svn_url":"https://github.com/segmentio/analytics-php","homepage":"https://segment.com/libraries/php","size":777,"stargazers_count":101,"watchers_count":101,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":13,"forks":59,"open_issues":13,"watchers":101,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/analytics-php/pulls/60"},"html":{"href":"https://github.com/segmentio/analytics-php/pull/60"},"issue":{"href":"https://api.github.com/repos/segmentio/analytics-php/issues/60"},"comments":{"href":"https://api.github.com/repos/segmentio/analytics-php/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/analytics-php/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/analytics-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segmentio/analytics-php/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/analytics-php/statuses/433ab299680f72c7adbc1c1eee751f00aed77300"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"calvinfo","id":487539,"avatar_url":"https://avatars.githubusercontent.com/u/487539?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinfo","html_url":"https://github.com/calvinfo","followers_url":"https://api.github.com/users/calvinfo/followers","following_url":"https://api.github.com/users/calvinfo/following{/other_user}","gists_url":"https://api.github.com/users/calvinfo/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinfo/subscriptions","organizations_url":"https://api.github.com/users/calvinfo/orgs","repos_url":"https://api.github.com/users/calvinfo/repos","events_url":"https://api.github.com/users/calvinfo/events{/privacy}","received_events_url":"https://api.github.com/users/calvinfo/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":17,"deletions":1,"changed_files":2}}