Skip to:
Content

BuddyPress.org

Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#7920 closed defect (bug) (fixed)

Call to undefined function friends_delete_activity()

Reported by: thejimmy Owned by: r-a-y
Milestone: 3.2.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Friends Keywords: has-patch commit
Cc:

Description

Hello,
I have encountered following (potential) bug.

Use case:

  1. Enabled friends module
  2. Disabled Activity Streams module
  3. User A and User B are friends
  4. Either one of then cancels friedship. This results in call to function friends_remove_friend() in file buddypress/bp-friends/bp-friends-functions.php. This function executes call to function friends_delete_activity(). Hovewer this function is not defined, hence prudeces fatal error.


Look like because of disabled Activity Streams module, file buddypress/bp-friends/bp-friends-activity.php where the missing function is does not get loaded.

Attachments (1)

7920.01.patch (1.3 KB) - added by r-a-y 16 months ago.

Download all attachments as: .zip

Change History (4)

#1 @r-a-y
16 months ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 3.2.0

Thanks for the report, @thejimmy.

01.patch should fix this. A temporary workaround is to remove the call to friends_delete_activity().

@r-a-y
16 months ago

#2 @r-a-y
16 months ago

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

In 12185:

Friends: Fix fatal error when the Activity component is disabled and when attempting to remove a friend.

During some refactoring to only load the Friends activity module
conditionally (r11932), a spot was missed during the remove friends
routine, causing a fatal error if the Activity component is disabled.

Props thejimmy.
Anti-props r-a-y.

Fixes #7920 (3.x branch)

#3 @r-a-y
16 months ago

In 12186:

Friends: Fix fatal error when the Activity component is disabled and when attempting to remove a friend.

During some refactoring to only load the Friends activity module
conditionally (r11932), a spot was missed during the remove friends
routine, causing a fatal error if the Activity component is disabled.

Props thejimmy.
Anti-props r-a-y.

See #7920 (trunk)

Note: See TracTickets for help on using tickets.