Skip to content


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

rachelbaker opened this Issue · 1 comment

2 participants

WordPress REST API Team member

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.

@rachelbaker rachelbaker was assigned

#54 looks good to me.

@rmccue rmccue closed this in c9eabc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.