WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/12/2013 06:24:09 AM (7 years ago)
Author:
wonderboymusic
Message:
  • 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/query.php

    r25331 r25392  
    2121
    2222        $this->assertEquals( '', $users->get( 'fields' ) );
    23         $this->assertEquals( '', $users->query_vars['fields'] );
     23        $this->assertEquals( '', @$users->query_vars['fields'] );
    2424
    2525        $users->set( 'fields', 'all' );
Note: See TracChangeset for help on using the changeset viewer.