Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/25/2013 01:18:24 AM (12 years ago)
Author:
boonebgorges
Message:

Use strict type checking when setting default 'include' value in BP_User_Query

Using the empty() check resulted in problems when empty arrays were passed into
BP_User_Query as the 'include' parameter, such as when querying for a user's
friend requests when the user did not have any - in these cases, all users
ended up being returned.

Fixes #5071

Props imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-classes.php

    r7228 r7239  
    316316
    317317        // 'include' - User ids to include in the results
    318         $include     = ! empty( $include ) ? wp_parse_id_list( $include ) : array();
     318        $include     = false !== $include ? wp_parse_id_list( $include ) : array();
    319319        $include_ids = $this->get_include_ids( $include );
    320320        if ( ! empty( $include_ids ) ) {
Note: See TracChangeset for help on using the changeset viewer.