Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5571 closed defect (bug) (fixed)

Updating profile results in fatal error if activity component is disabled

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile r-a-y
Milestone: 2.0.1 Priority: normal
Severity: normal Version: 2.0
Component: Extended Profile Keywords:
Cc:

Description

Reported here:
http://buddypress.org/support/topic/bp-2-0-fatal-error-profile-updates/

shanebp and I cannot duplicate it, but adding a sanity check for the activity component is best in the bp_xprofile_updated_profile_activity() function.

Change History (4)

#1 @r-a-y
10 years ago

In 8305:

XProfile: Check for activity component before using bp_activity_get().

Currently, the bp_xprofile_updated_profile_activity() function does not
check if the activity component is active before using bp_activity_get().

This can potentially cause a fatal error when updating one's profile.

See #5571 (2.0-branch)

#2 @r-a-y
10 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 8306:

XProfile: Check for activity component before using bp_activity_get().

Currently, the bp_xprofile_updated_profile_activity() function does not
check if the activity component is active before using bp_activity_get().

This can potentially cause a fatal error when updating one's profile.

Fixes #5571 (trunk)

#3 @DJPaul
10 years ago

Or, this should be moved into the Activity component:

add_action( 'xprofile_updated_profile', 'bp_xprofile_updated_profile_activity', 10, 5 );

Which will avoid cluttering up functions like these with function_exists checks

#4 @r-a-y
10 years ago

True; view any bp-COMPONENT-activity.php file and all those functions do something similar at the moment, which isn't ideal.

I was thinking of doing a conditional check for bp-COMPONENT-activity.php in all our component loader's includes() method, but that is probably too disruptive for a point release.

Note: See TracTickets for help on using tickets.