Skip to:
Content

BuddyPress.org

Ticket #6977: 6977.BP_Friends_Friendship.patch

File 6977.BP_Friends_Friendship.patch, 1.2 KB (added by r-a-y, 4 years ago)
  • src/bp-friends/classes/class-bp-friends-friendship.php

     
    106106                $this->is_request = $is_request;
    107107
    108108                if ( !empty( $id ) ) {
    109                         $this->id                      = $id;
     109                        $this->id                      = (int) $id;
    110110                        $this->populate_friend_details = $populate_friend_details;
    111111                        $this->populate( $this->id );
    112112                }
     
    123123                $bp = buddypress();
    124124
    125125                if ( $friendship = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->friends->table_name} WHERE id = %d", $this->id ) ) ) {
    126                         $this->initiator_user_id = $friendship->initiator_user_id;
    127                         $this->friend_user_id    = $friendship->friend_user_id;
    128                         $this->is_confirmed      = $friendship->is_confirmed;
    129                         $this->is_limited        = $friendship->is_limited;
     126                        $this->initiator_user_id = (int) $friendship->initiator_user_id;
     127                        $this->friend_user_id    = (int) $friendship->friend_user_id;
     128                        $this->is_confirmed      = (int) $friendship->is_confirmed;
     129                        $this->is_limited        = (int) $friendship->is_limited;
    130130                        $this->date_created      = $friendship->date_created;
    131131                }
    132132