Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2015 02:27:49 PM (10 years ago)
Author:
djpaul
Message:

xprofile: fix broken selection of default values for checkboxes, select boxes, and multi-select boxes.

When we try to fetch a user's profile field value from the database, if it wasn't set, then we return an empty string.
A few profile field types were mishandling an empty string response from BP_XProfile_ProfileData::get_value_byid, and it was being mistakenly interpreted as a user selected value.

This change checks the return value from BP_XProfile_ProfileData::get_value_byid, and if it's empty, instead of always casting the value, sets the ongoing variable to an empty array instead.

Fixes #6134

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.