[wp-trac] [WordPress Trac] #33449: WP_User_Query generating notice (undefined index has_published_posts)

WordPress Trac noreply at wordpress.org
Thu Aug 20 01:12:53 UTC 2015


#33449: WP_User_Query generating notice (undefined index has_published_posts)
--------------------------+------------------------------
 Reporter:  Veraxus       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by dd32):

 IMHO this is showing something deeper - `$this->query_vars =
 wp_parse_args(..)` isn't being run in all cases, so `$this->query_vars`
 might not get filled with the defaults.

 At present the class adds a lot of `isset()` checks, checks that shouldn't
 be needed if the defaults were being filled correctly.

 @Veraxus is the notice being generated by a custom `WP_User_Query`
 instance? Can you let us know how you're calling the class?

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


More information about the wp-trac mailing list