Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/22/2016 10:38:28 PM (10 years ago)
Author:
r-a-y
Message:

XProfile: Cast properties as integers where appropriate.

See #6977.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php

    r10935 r11030  
    474474                // Merge the field array back in with the group array.
    475475                foreach( (array) $groups as $group ) {
    476 
    477476                        // Indexes may have been shifted after previous deletions, so we get a
    478477                        // fresh one each time through the loop.
     
    561560                                }
    562561                        }
     562                }
     563
     564                // Integer casting.
     565                foreach ( (array) $groups as $key => $data ) {
     566                        $groups[ $key ]->id          = (int) $groups[ $key ]->id;
     567                        $groups[ $key ]->group_order = (int) $groups[ $key ]->group_order;
     568                        $groups[ $key ]->can_delete  = (int) $groups[ $key ]->can_delete;
    563569                }
    564570
Note: See TracChangeset for help on using the changeset viewer.