{"action":"closed","issue":{"url":"https://api.github.com/repos/Automattic/WP-Job-Manager/issues/1784","repository_url":"https://api.github.com/repos/Automattic/WP-Job-Manager","labels_url":"https://api.github.com/repos/Automattic/WP-Job-Manager/issues/1784/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/WP-Job-Manager/issues/1784/comments","events_url":"https://api.github.com/repos/Automattic/WP-Job-Manager/issues/1784/events","html_url":"https://github.com/Automattic/WP-Job-Manager/issues/1784","id":453126608,"node_id":"MDU6SXNzdWU0NTMxMjY2MDg=","number":1784,"title":"Wrong posts array from cached query in get_job_listings() ","user":{"login":"anastis","id":682312,"node_id":"MDQ6VXNlcjY4MjMxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/682312?v=4","gravatar_id":"","url":"https://api.github.com/users/anastis","html_url":"https://github.com/anastis","followers_url":"https://api.github.com/users/anastis/followers","following_url":"https://api.github.com/users/anastis/following{/other_user}","gists_url":"https://api.github.com/users/anastis/gists{/gist_id}","starred_url":"https://api.github.com/users/anastis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anastis/subscriptions","organizations_url":"https://api.github.com/users/anastis/orgs","repos_url":"https://api.github.com/users/anastis/repos","events_url":"https://api.github.com/users/anastis/events{/privacy}","received_events_url":"https://api.github.com/users/anastis/received_events","type":"User","site_admin":false},"labels":[{"id":854260567,"node_id":"MDU6TGFiZWw4NTQyNjA1Njc=","url":"https://api.github.com/repos/Automattic/WP-Job-Manager/labels/[Status]%20Accepted","name":"[Status] Accepted","color":"0e8a16","default":false},{"id":42665695,"node_id":"MDU6TGFiZWw0MjY2NTY5NQ==","url":"https://api.github.com/repos/Automattic/WP-Job-Manager/labels/[Type]%20Bug","name":"[Type] Bug","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Automattic/WP-Job-Manager/milestones/28","html_url":"https://github.com/Automattic/WP-Job-Manager/milestone/28","labels_url":"https://api.github.com/repos/Automattic/WP-Job-Manager/milestones/28/labels","id":4252619,"node_id":"MDk6TWlsZXN0b25lNDI1MjYxOQ==","number":28,"title":"1.34.0","description":null,"creator":{"login":"jom","id":68693,"node_id":"MDQ6VXNlcjY4Njkz","avatar_url":"https://avatars3.githubusercontent.com/u/68693?v=4","gravatar_id":"","url":"https://api.github.com/users/jom","html_url":"https://github.com/jom","followers_url":"https://api.github.com/users/jom/followers","following_url":"https://api.github.com/users/jom/following{/other_user}","gists_url":"https://api.github.com/users/jom/gists{/gist_id}","starred_url":"https://api.github.com/users/jom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jom/subscriptions","organizations_url":"https://api.github.com/users/jom/orgs","repos_url":"https://api.github.com/users/jom/repos","events_url":"https://api.github.com/users/jom/events{/privacy}","received_events_url":"https://api.github.com/users/jom/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":17,"state":"open","created_at":"2019-04-23T16:41:37Z","updated_at":"2019-09-20T14:05:31Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2019-06-06T16:27:04Z","updated_at":"2019-09-20T14:05:31Z","closed_at":"2019-09-20T14:05:31Z","author_association":"NONE","body":"https://github.com/Automattic/WP-Job-Manager/blob/585e5cb5ca8332797909c3b370e0cfa394012967/wp-job-manager-functions.php#L182\r\n\r\nThe caching logic  of `get_job_listings()` completely disregards the other cases of the `'fields'` parameter (`ids`, `id=>parent`), and always populates the WP_Query::posts array with WP_Post objects unconditionally, breaking any existing code that assumes that e.g. an array of integers is returned.\r\n\r\nThe  side effects are only observable on the second and subsequent runs of e.g. `get_job_listings( [ 'fields' => 'ids' ] )`."}}
{"actor":{"display_login":"jom"}}