Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25292 closed defect (bug) (fixed)

WP_User_Query doesn't fill in query vars when no args are passed to constructor

Reported by: wonderboymusic's profile wonderboymusic Owned by: wonderboymusic's profile wonderboymusic
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.1
Component: Query Keywords:
Focuses: Cc:

Description

When no query vars are filled in, WP_User_Query::prepare_query() and WP_User_Query::query() throw notices all over the place for undefined index. Fail.

Attachments (1)

25292.diff (5.4 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (2)

#1 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 25392:

  • Add isset() checks all over WP_User_Query::prepare_query() and WP_User_Query::query(). When a WP_User_Query instance is constructed without passing args, no query vars are filled in, thus $qv doesn't contain most of the expected indices.
  • Suppress an undefined index notice in tests/user/query.php

Fixes #25292.
See #25282.

Note: See TracTickets for help on using tickets.