Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 14 years ago

#2586 closed defect (bug) (fixed)

BP_XProfile_ProfileData->populate() should still populate field_id and user_id when not in db

Reported by: smurkas's profile smurkas Owned by:
Milestone: 1.5 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

Right now when a new BP_XProfile_Field is instanced and there isn't any data for the field in the database setting the field value and then running save will fail.

In order to actually be able to save the field the field_id and user_id has to be set manually even though these variables are known when the field data is populated.

This fix will populate field_id and user_id when a row is not found in the database and thus allowing just setting the value and then calling save to work.

Attachments (1)

bp-xprofile-profiledata.patch (456 bytes) - added by smurkas 15 years ago.

Download all attachments as: .zip

Change History (3)

#1 @boonebgorges
14 years ago

  • Milestone set to 1.5
  • Severity set to normal

Confirmed.

#2 @boonebgorges
14 years ago

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

(In [4905]) Set user_id and field_id properties in BP_XProfile_ProfileData::populate() when now row is found, to allow class to be properly instantiated in all cases. Fixes #2586. Props smurkas

Note: See TracTickets for help on using tickets.