{"action":"closed","number":16,"pull_request":{"url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16","id":77674246,"html_url":"https://github.com/bamadesigner/rock-the-slackbot/pull/16","diff_url":"https://github.com/bamadesigner/rock-the-slackbot/pull/16.diff","patch_url":"https://github.com/bamadesigner/rock-the-slackbot/pull/16.patch","issue_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/16","number":16,"state":"closed","locked":false,"title":"Process slack_response only when not a WP_Error object","user":{"login":"mpeshev","id":328189,"avatar_url":"https://avatars.githubusercontent.com/u/328189?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeshev","html_url":"https://github.com/mpeshev","followers_url":"https://api.github.com/users/mpeshev/followers","following_url":"https://api.github.com/users/mpeshev/following{/other_user}","gists_url":"https://api.github.com/users/mpeshev/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeshev/subscriptions","organizations_url":"https://api.github.com/users/mpeshev/orgs","repos_url":"https://api.github.com/users/mpeshev/repos","events_url":"https://api.github.com/users/mpeshev/events{/privacy}","received_events_url":"https://api.github.com/users/mpeshev/received_events","type":"User","site_admin":false},"body":"In case $slack_response is a WP_Error object, the terms of the second conditional statement are also verified, which causes a fatal error, namely:\r\n\r\n    PHP Fatal error:  Cannot use object of type WP_Error as array in /var/www/project/wp-content/plugins/rock-the-slackbot/includes/outgoing-webhooks.php on line 164\r\n\r\nChanging to an `else if` statement makes more sense and avoids the crash of the PHP process and losing metadata (custom fields values) while saving a post.","created_at":"2016-07-15T20:33:55Z","updated_at":"2016-10-16T04:41:59Z","closed_at":"2016-10-16T04:41:59Z","merged_at":"2016-10-16T04:41:59Z","merge_commit_sha":"ab30c9f6da34b630eb37002a0109c8859f2521b2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16/commits","review_comments_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16/comments","review_comment_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/16/comments","statuses_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/statuses/9fdea726f078309137842359514c75fea106ac17","head":{"label":"mpeshev:master","ref":"master","sha":"9fdea726f078309137842359514c75fea106ac17","user":{"login":"mpeshev","id":328189,"avatar_url":"https://avatars.githubusercontent.com/u/328189?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeshev","html_url":"https://github.com/mpeshev","followers_url":"https://api.github.com/users/mpeshev/followers","following_url":"https://api.github.com/users/mpeshev/following{/other_user}","gists_url":"https://api.github.com/users/mpeshev/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeshev/subscriptions","organizations_url":"https://api.github.com/users/mpeshev/orgs","repos_url":"https://api.github.com/users/mpeshev/repos","events_url":"https://api.github.com/users/mpeshev/events{/privacy}","received_events_url":"https://api.github.com/users/mpeshev/received_events","type":"User","site_admin":false},"repo":{"id":63448951,"name":"rock-the-slackbot","full_name":"mpeshev/rock-the-slackbot","owner":{"login":"mpeshev","id":328189,"avatar_url":"https://avatars.githubusercontent.com/u/328189?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeshev","html_url":"https://github.com/mpeshev","followers_url":"https://api.github.com/users/mpeshev/followers","following_url":"https://api.github.com/users/mpeshev/following{/other_user}","gists_url":"https://api.github.com/users/mpeshev/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeshev/subscriptions","organizations_url":"https://api.github.com/users/mpeshev/orgs","repos_url":"https://api.github.com/users/mpeshev/repos","events_url":"https://api.github.com/users/mpeshev/events{/privacy}","received_events_url":"https://api.github.com/users/mpeshev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpeshev/rock-the-slackbot","description":"A WordPress plugin that helps you stay on top of changes by sending notifications straight to you and your team inside your Slack account.","fork":true,"url":"https://api.github.com/repos/mpeshev/rock-the-slackbot","forks_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/forks","keys_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/teams","hooks_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/hooks","issue_events_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/issues/events{/number}","events_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/events","assignees_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/assignees{/user}","branches_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/branches{/branch}","tags_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/tags","blobs_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/statuses/{sha}","languages_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/languages","stargazers_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/stargazers","contributors_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/contributors","subscribers_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/subscribers","subscription_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/subscription","commits_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/contents/{+path}","compare_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/merges","archive_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/downloads","issues_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/issues{/number}","pulls_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/pulls{/number}","milestones_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/milestones{/number}","notifications_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/labels{/name}","releases_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/releases{/id}","deployments_url":"https://api.github.com/repos/mpeshev/rock-the-slackbot/deployments","created_at":"2016-07-15T20:23:24Z","updated_at":"2016-07-15T20:23:25Z","pushed_at":"2016-07-15T20:31:34Z","git_url":"git://github.com/mpeshev/rock-the-slackbot.git","ssh_url":"git@github.com:mpeshev/rock-the-slackbot.git","clone_url":"https://github.com/mpeshev/rock-the-slackbot.git","svn_url":"https://github.com/mpeshev/rock-the-slackbot","homepage":"https://wordpress.org/plugins/rock-the-slackbot/","size":289,"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":"bamadesigner:master","ref":"master","sha":"580ec93dbfeb61ee5a0043c147be75de8afcb4ef","user":{"login":"bamadesigner","id":1513046,"avatar_url":"https://avatars.githubusercontent.com/u/1513046?v=3","gravatar_id":"","url":"https://api.github.com/users/bamadesigner","html_url":"https://github.com/bamadesigner","followers_url":"https://api.github.com/users/bamadesigner/followers","following_url":"https://api.github.com/users/bamadesigner/following{/other_user}","gists_url":"https://api.github.com/users/bamadesigner/gists{/gist_id}","starred_url":"https://api.github.com/users/bamadesigner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamadesigner/subscriptions","organizations_url":"https://api.github.com/users/bamadesigner/orgs","repos_url":"https://api.github.com/users/bamadesigner/repos","events_url":"https://api.github.com/users/bamadesigner/events{/privacy}","received_events_url":"https://api.github.com/users/bamadesigner/received_events","type":"User","site_admin":false},"repo":{"id":45362835,"name":"rock-the-slackbot","full_name":"bamadesigner/rock-the-slackbot","owner":{"login":"bamadesigner","id":1513046,"avatar_url":"https://avatars.githubusercontent.com/u/1513046?v=3","gravatar_id":"","url":"https://api.github.com/users/bamadesigner","html_url":"https://github.com/bamadesigner","followers_url":"https://api.github.com/users/bamadesigner/followers","following_url":"https://api.github.com/users/bamadesigner/following{/other_user}","gists_url":"https://api.github.com/users/bamadesigner/gists{/gist_id}","starred_url":"https://api.github.com/users/bamadesigner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamadesigner/subscriptions","organizations_url":"https://api.github.com/users/bamadesigner/orgs","repos_url":"https://api.github.com/users/bamadesigner/repos","events_url":"https://api.github.com/users/bamadesigner/events{/privacy}","received_events_url":"https://api.github.com/users/bamadesigner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bamadesigner/rock-the-slackbot","description":"A WordPress plugin that helps you stay on top of changes by sending notifications straight to you and your team inside your Slack account.","fork":false,"url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot","forks_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/forks","keys_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/teams","hooks_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/hooks","issue_events_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/events{/number}","events_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/events","assignees_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/assignees{/user}","branches_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/branches{/branch}","tags_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/tags","blobs_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/statuses/{sha}","languages_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/languages","stargazers_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/stargazers","contributors_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/contributors","subscribers_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/subscribers","subscription_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/subscription","commits_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/contents/{+path}","compare_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/merges","archive_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/downloads","issues_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues{/number}","pulls_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls{/number}","milestones_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/milestones{/number}","notifications_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/labels{/name}","releases_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/releases{/id}","deployments_url":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/deployments","created_at":"2015-11-02T00:01:52Z","updated_at":"2016-09-14T14:58:34Z","pushed_at":"2016-10-16T04:42:00Z","git_url":"git://github.com/bamadesigner/rock-the-slackbot.git","ssh_url":"git@github.com:bamadesigner/rock-the-slackbot.git","clone_url":"https://github.com/bamadesigner/rock-the-slackbot.git","svn_url":"https://github.com/bamadesigner/rock-the-slackbot","homepage":"https://wordpress.org/plugins/rock-the-slackbot/","size":307,"stargazers_count":32,"watchers_count":32,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16"},"html":{"href":"https://github.com/bamadesigner/rock-the-slackbot/pull/16"},"issue":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/16"},"comments":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/bamadesigner/rock-the-slackbot/statuses/9fdea726f078309137842359514c75fea106ac17"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bamadesigner","id":1513046,"avatar_url":"https://avatars.githubusercontent.com/u/1513046?v=3","gravatar_id":"","url":"https://api.github.com/users/bamadesigner","html_url":"https://github.com/bamadesigner","followers_url":"https://api.github.com/users/bamadesigner/followers","following_url":"https://api.github.com/users/bamadesigner/following{/other_user}","gists_url":"https://api.github.com/users/bamadesigner/gists{/gist_id}","starred_url":"https://api.github.com/users/bamadesigner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamadesigner/subscriptions","organizations_url":"https://api.github.com/users/bamadesigner/orgs","repos_url":"https://api.github.com/users/bamadesigner/repos","events_url":"https://api.github.com/users/bamadesigner/events{/privacy}","received_events_url":"https://api.github.com/users/bamadesigner/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"bamadesigner"}}