Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#3929 closed defect (bug) (fixed)

Suppress warnings when $members_template->member->profile_data keys are not set

Reported by: CoenJacobs Owned by:
Priority: normal Milestone: 1.6
Component: Members Version: 1.5
Severity: normal Keywords: has-patch
Cc:

Description

In bp-members/bp-members-template.php two keys of $members_template->member->profile_data are called (field_type and field_data), even if they are not set. This results in notices which can easily be prevented.

Attachments (1)

3929.diff (891 bytes ) - added by CoenJacobs 15 years ago.
Suppress notices

Download all attachments as: .zip

Change History (6)

@CoenJacobs
15 years ago

Suppress notices

#1 @CoenJacobs
15 years ago

  • Summary Surpress warnings when $members_template->member->profile_data keys are not setSuppress warnings when $members_template->member->profile_data keys are not set

#2 follow-up: @DJPaul
15 years ago

  • Component CoreMembers
  • Keywords reporter-feedback added; dev-feedback removed
  • Milestone Awaiting Review1.6

Patch is valid but I'm interested in how this error is being triggered. Are you adding custom profile field types, or filtering the results?

#3 in reply to: ↑ 2 @CoenJacobs
15 years ago

  • Keywords reporter-feedback removed

Replying to DJPaul:

Patch is valid but I'm interested in how this error is being triggered. Are you adding custom profile field types, or filtering the results?

I'm simply calling it like this:

bp_member_profile_data( 'field=Location' );

#4 @CoenJacobs
15 years ago

To add to this, I'm calling that function in a pretty straight forward loop:

while ( bp_members() ) : bp_the_member();

#5 @djpaul
15 years ago

  • Resolutionfixed
  • Status newclosed

(In [5646]) Prevent PHP Notices when retrieving a user's profile field that hasn't had a value set. Fixes #3929, props CoenJacobs for initial patch

Note: See TracTickets for help on using tickets.