Skip to:
Content

BuddyPress.org

Ticket #3572: 3572.02.diff

File 3572.02.diff, 778 bytes (added by boonebgorges, 15 years ago)
  • bp-xprofile/bp-xprofile-classes.php

    Class BP_XProfile_Group {  
    174174
    175175                                // Loop through the results and find the fields that have data.
    176176                                foreach( (array)$field_data as $data ) {
    177                                         if ( false !== $key = array_search( $data->field_id, $field_ids ) ) {
     177                                        // Empty fields may contain a serialized empty array
     178                                        $maybe_value = maybe_unserialize( $data->value );
     179                                        if ( !empty( $maybe_value ) && false !== $key = array_search( $data->field_id, $field_ids ) ) {
    178180                                                // Fields that have data get removed from the list
    179181                                                unset( $field_ids[$key] );
    180182                                        }