diff --git src/bp-friends/classes/class-bp-friends-friendship.php src/bp-friends/classes/class-bp-friends-friendship.php
index 761033541..9fa625cc7 100644
|
|
class BP_Friends_Friendship { |
197 | 197 | * |
198 | 198 | * @param BP_Friends_Friendship $value Current friendship request object. |
199 | 199 | */ |
200 | | do_action( 'friends_friendship_after_save', array( &$this ) ); |
| 200 | do_action_ref_array( 'friends_friendship_after_save', array( &$this ) ); |
201 | 201 | |
202 | 202 | return $result; |
203 | 203 | } |
… |
… |
class BP_Friends_Friendship { |
614 | 614 | * |
615 | 615 | * @since 3.0.0 |
616 | 616 | * |
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 |
618 | 618 | * 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 |
620 | 620 | * to check friendship status with primary user. |
621 | 621 | * @return null |
622 | 622 | */ |
… |
… |
class BP_Friends_Friendship { |
628 | 628 | $fetch = array(); |
629 | 629 | foreach ( $possible_friend_ids as $friend_id ) { |
630 | 630 | // 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' ) |
632 | 632 | || false === bp_core_get_incremented_cache( $friend_id . ':' . $user_id, 'bp_friends' ) ) { |
633 | 633 | $fetch[] = $friend_id; |
634 | 634 | } |
… |
… |
class BP_Friends_Friendship { |
649 | 649 | if ( 1 === (int) $friendship->is_confirmed ) { |
650 | 650 | $status_initiator = $status_friend = 'is_friend'; |
651 | 651 | } else { |
652 | | $status_initiator = 'pending'; |
| 652 | $status_initiator = 'pending'; |
653 | 653 | $status_friend = 'awaiting_response'; |
654 | 654 | } |
655 | 655 | bp_core_set_incremented_cache( $initiator_user_id . ':' . $friend_user_id, 'bp_friends', $status_initiator ); |
diff --git tests/phpunit/testcases/members/template.php tests/phpunit/testcases/members/template.php
index 13c53dccd..f9aed7d2d 100644
|
|
class BP_Tests_Members_Template extends BP_UnitTestCase { |
27 | 27 | /** |
28 | 28 | * @ticket BP5898 |
29 | 29 | * @group bp_has_members |
| 30 | * @group imath |
30 | 31 | */ |
31 | 32 | public function test_bp_has_members_search_pagination_with_spaces() { |
32 | 33 | $u1 = self::factory()->user->create( array( 'display_name' => '~ tilde u1' ) ); |
… |
… |
class BP_Tests_Members_Template extends BP_UnitTestCase { |
42 | 43 | |
43 | 44 | bp_has_members( $template_args ); |
44 | 45 | |
45 | | preg_match( '/&members_search=(.*)\'/', $members_template->pag_links, $matches ); |
| 46 | preg_match( '/&members_search=(.*)(\'|\")/', $members_template->pag_links, $matches ); |
46 | 47 | |
47 | 48 | $this->assertEquals( urldecode( $matches[1] ), urldecode( $template_args['search_terms'] ) ); |
48 | 49 | |