Skip to:
Content

BuddyPress.org

Changeset 8963


Ignore:
Timestamp:
08/25/2014 10:49:29 PM (10 years ago)
Author:
johnjamesjacoby
Message:

In bp_get_the_profile_field_ids() make sure field group has fields before attempting to pluck ID's from it. Fixes strict-mode debug-notice when trying to get all field ID's, typically for saving fields in bulk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-template.php

    r8822 r8963  
    335335        $field_ids = array();
    336336        foreach ( $profile_template->groups as $group ) {
    337             $field_ids = array_merge( $field_ids, wp_list_pluck( $group->fields, 'id' ) );
     337            if ( ! empty( $group->fields ) ) {
     338                $field_ids = array_merge( $field_ids, wp_list_pluck( $group->fields, 'id' ) );
     339            }
    338340        }
    339341
Note: See TracChangeset for help on using the changeset viewer.