Skip to:
Content

BuddyPress.org

Changeset 10710


Ignore:
Timestamp:
04/15/2016 12:59:41 AM (9 years ago)
Author:
r-a-y
Message:

Friends: Cast BP_Friends_Friendship class properties as integers where appropriate.

See #6977.

File:
1 edited

Legend:

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

    r10587 r10710  
    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 );
     
    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        }
Note: See TracChangeset for help on using the changeset viewer.