Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2015 08:34:31 PM (12 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 for the 2.2 branch.

File:
1 edited

Legend:

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

    r9210 r9448  
    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.