Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8234 closed defect (bug) (fixed)

Activity: Fatal error on admin dashboard when using `'bp_get_activity_action'` filter

Reported by: r-a-y's profile r-a-y Owned by: slaffik's profile slaFFik
Milestone: 6.0.0 Priority: normal
Severity: normal Version: 1.6
Component: Administration Keywords: has-patch commit
Cc:

Description

If a plugin is filtering 'bp_get_activity_action' and uses more than the first argument, a fatal error occurs in the Activity dashboard.

This is because the duplicate filter in the activity dashboard's list table only uses one argument instead of three as in the real filter arguments.

Attached patch fixes this. Let me know if we need to pass the $activity object by reference. I don't think we need to, but I'm just following the convention used by the previous 'bp_get_activity_content_body' filter.

Attachments (1)

8234.01.patch (1.3 KB) - added by r-a-y 4 years ago.

Download all attachments as: .zip

Change History (8)

@r-a-y
4 years ago

#1 @imath
4 years ago

Hi @r-a-y

Thanks a lot for your catch and patch. It looks good to me the way it is. I’m just wondering if we should fix this earlier in 5.2.0 as it’s potentially causing a fatal error.

#2 @espellcaste
4 years ago

@r-a-y or @imath

What's the status of this one? Are we gonna add it to 6.0?

#3 @r-a-y
4 years ago

It seems like v6.0.0 is the next release, so I will commit this to trunk unless there are any objections?

#4 @espellcaste
4 years ago

Let's see if @imath has any objections.

#5 @imath
4 years ago

  • Keywords commit added

Let’s commit it for 6.0.0 👌

#6 @r-a-y
4 years ago

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

In 12563:

Activity Admin: Mirror 'bp_get_activity_action' filter arguments.

The main 'bp_get_activity_action' filter uses 3 parameters. We need
to mirror all filter arguments to prevent a potential fatal error from
occurring in the activity dashboard.

Fixes #8234.

#7 @r-a-y
4 years ago

In 12564:

Activity: Minor PHPDoc audit for bp_get_activity_action() function.

See #8234, #4648.

Note: See TracTickets for help on using tickets.