[wp-trac] [WordPress Trac] #27998: the_author_posts() returns an inaccurate value with the author has no published posts
WordPress Trac
noreply at wordpress.org
Wed Apr 23 22:24:14 UTC 2014
#27998: the_author_posts() returns an inaccurate value with the author has no
published posts
--------------------------+------------------------------
Reporter: jbenton | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.0
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by krogsgard):
It seems to me that two things may need to occur:
* Do a check for a returned value on get_post()->post_author in
get_the_author_posts() to prevent a notice.
* Create the condition to exit early from get_posts_by_author_sql if a
user ID isn't passed. Is there any reason to create continue without a
post author?
I'd love for this to be my first patch, but want to make sure I go the
right route :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27998#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list