Skip to:
Content

BuddyPress.org

Changeset 11024


Ignore:
Timestamp:
08/22/2016 09:35:42 PM (4 years ago)
Author:
r-a-y
Message:

Core: Cast properties as integers where appropriate.

See #6977.

Location:
trunk/src/bp-core/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-core-user.php

    r10825 r11024  
    812812        foreach ( $user_ids as $user_id ) {
    813813            $retval[ $user_id ] = wp_cache_get( $user_id, 'bp_last_activity' );
     814            $retval[ $user_id ]['user_id']     = (int) $retval[ $user_id ]['user_id'];
     815            $retval[ $user_id ]['activity_id'] = (int) $retval[ $user_id ]['activity_id'];
    814816        }
    815817
  • trunk/src/bp-core/classes/class-bp-user-query.php

    r10913 r11024  
    592592        foreach ( $this->user_ids as $key => $uid ) {
    593593            if ( isset( $r[ $uid ] ) ) {
     594                $r[ $uid ]->ID = (int) $uid;
     595                $r[ $uid ]->user_status = (int) $r[ $uid ]->user_status;
     596
    594597                $this->results[ $uid ] = $r[ $uid ];
    595598
    596599                // The BP template functions expect an 'id'
    597600                // (as opposed to 'ID') property.
    598                 $this->results[ $uid ]->id = $uid;
     601                $this->results[ $uid ]->id = (int) $uid;
    599602
    600603            // Remove user ID from original user_ids property.
Note: See TracChangeset for help on using the changeset viewer.