WP_JSON_Posts->prepare_author() needs check that $user exists #51

Closed
rachelbaker opened this Issue Dec 9, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@rachelbaker
Member

rachelbaker commented Dec 9, 2013

In the prepare_author method there is a conditional early return if the $author parameter wasn't passed, we should add an additional condition to verify the $user object was returned.

This is a minor bug in the logic, but it can happen if a user account was removed but the deleted user's posts weren't re-assigned.

Pull request with minor fix forthcoming.

@pippinsplugins

This comment has been minimized.

Show comment
Hide comment
@pippinsplugins

pippinsplugins Dec 15, 2013

Contributor

#54 looks good to me.

Contributor

pippinsplugins commented Dec 15, 2013

#54 looks good to me.

@rmccue rmccue closed this in c9eabc5 Feb 17, 2014

kellbot pushed a commit to kellbot/WP-API that referenced this issue Aug 1, 2014

Merge pull request #54 from rachelbaker/issue-51
Added conditional to verify the $user object is set in prepare_author method.

Fixes #51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment