Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/16/2019 09:52:45 PM (5 years ago)
Author:
imath
Message:

Fix failing tests under WordPress trunk (5.3)

  1. Use do_action_ref_array() instead of do_action() to pass the BP_Friends_Friendship object by reference.
  2. Adapts the test_bp_has_members_search_pagination_with_spaces() test to WordPress changes in the paginate_links() function.

Fixes #8135

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/classes/class-bp-friends-friendship.php

    r11865 r12459  
    198198         * @param BP_Friends_Friendship $value Current friendship request object.
    199199         */
    200         do_action( 'friends_friendship_after_save', array( &$this ) );
     200        do_action_ref_array( 'friends_friendship_after_save', array( &$this ) );
    201201
    202202        return $result;
     
    615615     * @since 3.0.0
    616616     *
    617      * @param int $user_id                          The ID of the primary user for whom we want 
     617     * @param int $user_id                          The ID of the primary user for whom we want
    618618     *                                              to check friendships statuses.
    619      * @param int|array|string $possible_friend_ids The IDs of the one or more users 
     619     * @param int|array|string $possible_friend_ids The IDs of the one or more users
    620620     *                                              to check friendship status with primary user.
    621621     * @return null
     
    629629        foreach ( $possible_friend_ids as $friend_id ) {
    630630            // Check for cached items in both friendship directions.
    631             if ( false === bp_core_get_incremented_cache( $user_id . ':' . $friend_id, 'bp_friends' ) 
     631            if ( false === bp_core_get_incremented_cache( $user_id . ':' . $friend_id, 'bp_friends' )
    632632                || false === bp_core_get_incremented_cache( $friend_id . ':' . $user_id, 'bp_friends' ) ) {
    633633                $fetch[] = $friend_id;
     
    650650                $status_initiator = $status_friend = 'is_friend';
    651651            } else {
    652                 $status_initiator = 'pending'; 
     652                $status_initiator = 'pending';
    653653                $status_friend    = 'awaiting_response';
    654654            }
Note: See TracChangeset for help on using the changeset viewer.