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

WordPress Trac noreply at wordpress.org
Thu Aug 20 19:42:10 UTC 2015


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

Comment (by Veraxus):

 I'm seeing these in all projects were Posts 2 Posts has been used, and
 even a couple where it isn't (but where custom user queries are very
 likely being used). As @dd32 pointed out, this may need a more
 comprehensive fix than I proposed to fix a deeper underlying issue.

 The class shouldn't throw notices simply because `query_vars` wasn't
 passed a comprehensive list of arguments. A default-setting process ( e,g,
 `$this->query_vars = wp_parse_args( … )` ) really should run each time
 `WP_User_Query` is used.

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


More information about the wp-trac mailing list