{"action":"created","comment":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments/222663399","pull_request_review_id":161603773,"id":222663399,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjY2MzM5OQ==","diff_hunk":"@@ -464,17 +464,21 @@ protected function get_singular_post() {\n \t\treturn $post;\n \t}\n \n-\t/**\n-\t * Gets the focus keyword for a given post.\n-\t *\n-\t * @param WP_Post $post Post object to get its focus keyword.\n-\t *\n-\t * @return string Focus keyword, or empty string if none available.\n-\t */\n-\tprotected function get_post_focus_keyword( WP_Post $post ) {\n-\t\tif ( apply_filters( 'wpseo_use_page_analysis', true ) !== true ) {\n-\t\t\treturn '';\n-\t\t}\n+    /**\n+     * Gets the focus keyword for a given post.\n+     *\n+     * @param $post Post object to get its focus keyword.\n+     *\n+     * @return string Focus keyword, or empty string if none available.\n+     */\n+    protected function get_post_focus_keyword( $post ) {\n+        if ( ! is_object( $post ) || ! property_exists( $post, 'ID' ) ) {","path":"inc/class-wpseo-admin-bar-menu.php","position":23,"original_position":23,"commit_id":"280035d7d62dc5818fa425db00df9c150cfbbe79","original_commit_id":"280035d7d62dc5818fa425db00df9c150cfbbe79","user":{"login":"benvaassen","id":11910661,"node_id":"MDQ6VXNlcjExOTEwNjYx","avatar_url":"https://avatars1.githubusercontent.com/u/11910661?v=4","gravatar_id":"","url":"https://api.github.com/users/benvaassen","html_url":"https://github.com/benvaassen","followers_url":"https://api.github.com/users/benvaassen/followers","following_url":"https://api.github.com/users/benvaassen/following{/other_user}","gists_url":"https://api.github.com/users/benvaassen/gists{/gist_id}","starred_url":"https://api.github.com/users/benvaassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benvaassen/subscriptions","organizations_url":"https://api.github.com/users/benvaassen/orgs","repos_url":"https://api.github.com/users/benvaassen/repos","events_url":"https://api.github.com/users/benvaassen/events{/privacy}","received_events_url":"https://api.github.com/users/benvaassen/received_events","type":"User","site_admin":false},"body":"Discussed and we'll keep it as it is. ","created_at":"2018-10-04T13:16:13Z","updated_at":"2018-10-04T13:16:14Z","html_url":"https://github.com/Yoast/wordpress-seo/pull/11163#discussion_r222663399","pull_request_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments/222663399"},"html":{"href":"https://github.com/Yoast/wordpress-seo/pull/11163#discussion_r222663399"},"pull_request":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163"}},"in_reply_to_id":222611571},"pull_request":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163","id":220267670,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMjY3Njcw","html_url":"https://github.com/Yoast/wordpress-seo/pull/11163","diff_url":"https://github.com/Yoast/wordpress-seo/pull/11163.diff","patch_url":"https://github.com/Yoast/wordpress-seo/pull/11163.patch","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11163","number":11163,"state":"open","locked":false,"title":"Check if properties exists instead of forcing a specific object","user":{"login":"benvaassen","id":11910661,"node_id":"MDQ6VXNlcjExOTEwNjYx","avatar_url":"https://avatars1.githubusercontent.com/u/11910661?v=4","gravatar_id":"","url":"https://api.github.com/users/benvaassen","html_url":"https://github.com/benvaassen","followers_url":"https://api.github.com/users/benvaassen/followers","following_url":"https://api.github.com/users/benvaassen/following{/other_user}","gists_url":"https://api.github.com/users/benvaassen/gists{/gist_id}","starred_url":"https://api.github.com/users/benvaassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benvaassen/subscriptions","organizations_url":"https://api.github.com/users/benvaassen/orgs","repos_url":"https://api.github.com/users/benvaassen/repos","events_url":"https://api.github.com/users/benvaassen/events{/privacy}","received_events_url":"https://api.github.com/users/benvaassen/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nThis PR can be summarized in the following changelog entry:\r\n\r\n* Fixes a bug where a type error is thrown when the posts or terms focus keyword isn't of the type WP_Post as this can collide with third-party plugins.\r\n\r\n## Relevant technical choices:\r\n\r\n* Instead of forcing the object type I just check if the argument is an object and if it contains the needed properties.\r\n\r\n## Test instructions\r\n<!--\r\nPlease follow these guidelines when creating test instructions:\r\n- Please provide step-by-step instructions how to reproduce the issue, if applicable.\r\n- Write step-by-step test instructions aimed at non-tech-savvy users, even if the PR is not user-facing.\r\n-->\r\nThis PR can be tested by following these steps:\r\n\r\n* Check if the bullet still works on the adminbar in the frontend when viewing a post and term page.\r\n\r\n## Quality assurance\r\n\r\n* [x] I have tested this code to the best of my abilities\r\n* [ ] I have added unittests to verify the code works as intended\r\n\r\nFixes #10825\r\n","created_at":"2018-10-04T06:52:48Z","updated_at":"2018-10-04T13:16:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2894874fc112b172759f0d217a7d954144f1c6df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163/commits","review_comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163/comments","review_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11163/comments","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/280035d7d62dc5818fa425db00df9c150cfbbe79","head":{"label":"Yoast:10825-check-wrong-argument","ref":"10825-check-wrong-argument","sha":"280035d7d62dc5818fa425db00df9c150cfbbe79","user":{"login":"Yoast","id":4690436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2OTA0MzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4690436?v=4","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":6723399,"node_id":"MDEwOlJlcG9zaXRvcnk2NzIzMzk5","name":"wordpress-seo","full_name":"Yoast/wordpress-seo","private":false,"owner":{"login":"Yoast","id":4690436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2OTA0MzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4690436?v=4","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Yoast/wordpress-seo","description":"Yoast SEO for WordPress","fork":false,"url":"https://api.github.com/repos/Yoast/wordpress-seo","forks_url":"https://api.github.com/repos/Yoast/wordpress-seo/forks","keys_url":"https://api.github.com/repos/Yoast/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/Yoast/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/events","assignees_url":"https://api.github.com/repos/Yoast/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/Yoast/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/Yoast/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/wordpress-seo/merges","archive_url":"https://api.github.com/repos/Yoast/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/wordpress-seo/releases{/id}","deployments_url":"https://api.github.com/repos/Yoast/wordpress-seo/deployments","created_at":"2012-11-16T15:16:29Z","updated_at":"2018-10-04T12:38:16Z","pushed_at":"2018-10-04T12:38:17Z","git_url":"git://github.com/Yoast/wordpress-seo.git","ssh_url":"git@github.com:Yoast/wordpress-seo.git","clone_url":"https://github.com/Yoast/wordpress-seo.git","svn_url":"https://github.com/Yoast/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":699911,"stargazers_count":990,"watchers_count":990,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":564,"mirror_url":null,"archived":false,"open_issues_count":1061,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":564,"open_issues":1061,"watchers":990,"default_branch":"trunk"}},"base":{"label":"Yoast:trunk","ref":"trunk","sha":"a52d5b5926dd72e948e04f62ff610ffee8bf5bc2","user":{"login":"Yoast","id":4690436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2OTA0MzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4690436?v=4","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":6723399,"node_id":"MDEwOlJlcG9zaXRvcnk2NzIzMzk5","name":"wordpress-seo","full_name":"Yoast/wordpress-seo","private":false,"owner":{"login":"Yoast","id":4690436,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2OTA0MzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4690436?v=4","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Yoast/wordpress-seo","description":"Yoast SEO for WordPress","fork":false,"url":"https://api.github.com/repos/Yoast/wordpress-seo","forks_url":"https://api.github.com/repos/Yoast/wordpress-seo/forks","keys_url":"https://api.github.com/repos/Yoast/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/Yoast/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/events","assignees_url":"https://api.github.com/repos/Yoast/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/Yoast/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/Yoast/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/wordpress-seo/merges","archive_url":"https://api.github.com/repos/Yoast/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/wordpress-seo/releases{/id}","deployments_url":"https://api.github.com/repos/Yoast/wordpress-seo/deployments","created_at":"2012-11-16T15:16:29Z","updated_at":"2018-10-04T12:38:16Z","pushed_at":"2018-10-04T12:38:17Z","git_url":"git://github.com/Yoast/wordpress-seo.git","ssh_url":"git@github.com:Yoast/wordpress-seo.git","clone_url":"https://github.com/Yoast/wordpress-seo.git","svn_url":"https://github.com/Yoast/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":699911,"stargazers_count":990,"watchers_count":990,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":564,"mirror_url":null,"archived":false,"open_issues_count":1061,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":564,"open_issues":1061,"watchers":990,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163"},"html":{"href":"https://github.com/Yoast/wordpress-seo/pull/11163"},"issue":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11163"},"comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11163/comments"},"review_comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163/comments"},"review_comment":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11163/commits"},"statuses":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/280035d7d62dc5818fa425db00df9c150cfbbe79"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"benvaassen"}}