[wp-trac] [WordPress Trac] #44510: count_user_posts() does not check for empty $userid

WordPress Trac noreply at wordpress.org
Sat Jul 7 13:56:34 UTC 2018


#44510: count_user_posts() does not check for empty $userid
--------------------------+------------------------------
 Reporter:  Ste_95        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by Ste_95):

 I don't think we should check for `is_user_logged_in()`, since
 `get_posts_by_author_sql()` doesn't change its behavior in case the user
 is logged in.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44510#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list