Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2015 08:32:55 PM (10 years ago)
Author:
boonebgorges
Message:

When prefetching member types in the loop, cache arrays instead of strings.

Member type caches should always be arrays of all member types for a user.

Props imath.
Fixes #6193.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-user-query.php

    r9210 r9447  
    515515        ) );
    516516
    517         $this->assertSame( 'foo', wp_cache_get( $users[0], 'bp_member_type' ) );
    518         $this->assertSame( 'bar', wp_cache_get( $users[1], 'bp_member_type' ) );
    519         $this->assertSame( 'foo', wp_cache_get( $users[2], 'bp_member_type' ) );
     517        $this->assertSame( array( 'foo' ), wp_cache_get( $users[0], 'bp_member_type' ) );
     518        $this->assertSame( array( 'bar' ), wp_cache_get( $users[1], 'bp_member_type' ) );
     519        $this->assertSame( array( 'foo' ), wp_cache_get( $users[2], 'bp_member_type' ) );
    520520        $this->assertSame( '', wp_cache_get( $users[3], 'bp_member_type' ) );
    521521    }
Note: See TracChangeset for help on using the changeset viewer.