Skip to:

Opened 8 years ago

Closed 8 years ago

#7154 closed enhancement (fixed)

bp_profile_get_field_groups() does not set `fields` property for xprofile groups without fields

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile djpaul
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords:


When using bp_profile_get_field_groups, you get an array of objects for each profile field group. Within each object, there's a property fields which is an array of objects for the fields in that group.

However, if a field group has no fields, this fields property is not set. It really should be set as an empty array for consistency in its return types.

Change History (2)

#1 @DJPaul
8 years ago

  • Milestone changed from Future Release to 2.7

#2 @djpaul
8 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 10935:

xprofile: always initialise fields property when fetching field groups.

When using bp_profile_get_field_groups, xprofile field groups without any fields did not have a fields property set in the return value. This changes initialises the property to an empty array, to increase the data consistency of the results.

Fixes #7154

Note: See TracTickets for help on using tickets.