[wp-trac] [WordPress Trac] #33449: WP_User_Query generating notice (undefined index has_published_posts)
WordPress Trac
noreply at wordpress.org
Wed Aug 19 20:24:21 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 | Keywords:
Focuses: |
--------------------------+-----------------------------
The new 'has_published_posts' (see #32250) parameter in 4.3 is incorrectly
handled by the class, and generates a notice...
{{{
Notice: Undefined index: has_published_posts in /Users/Matt/Dropbox/_Web
Projects/website.dev/wp-includes/user.php on line 662
}}}
Line 662 reads:
{{{
if ( $qv['has_published_posts'] && $blog_id ) {
}}}
But it '''''should''''' read:
{{{
if ( isset( $qv['has_published_posts'] ) && $blog_id ) {
}}}
This makes it consistent with the rest of the properties handled by the
class. Patch is attached.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33449>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list