Skip to:

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#7531 closed defect (bug) (fixed)

Variables conflict in messages_notification_new_message()

Reported by: idofri Owned by: r-a-y
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.5.0
Component: Messages Keywords: has-patch


I've noticed that the $args variable in the messages_notification_new_message() function, is being repeatedly overwritten inside the loop and then being passed to the 'bp_messages_sent_notification_email' action hook.

Attachments (2)

7531.patch (807 bytes) - added by idofri 10 months ago.
7531.2.patch (838 bytes) - added by r-a-y 10 months ago.

Download all attachments as: .zip

Change History (6)

10 months ago

10 months ago

#1 @r-a-y
10 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 2.9
  • Version set to 2.5.0

Nice catch, @idofri.

Looks like your first BuddyPress ticket, so thanks for contributing!

Instead of $_args, I think we can just get rid that variable since we don't need it. See 7531.2.patch.

#2 @idofri
10 months ago

Sounds good @r-a-y, Thanks!

#3 @r-a-y
10 months ago

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

In 11562:

Messages: Fix $args parameter in 'bp_messages_sent_notification_email' hook.

This was broken since we added BuddyPress HTML email support in v2.5 and
changed the $args variable when sending an email.

This commit removes the $args override, which fixes this problem.

Props idofri.

Fixes #7531.

#4 @r-a-y
10 months ago

In 11563:

Buttons: Ensure that certain BP_Button class properties are updated.

Specifically, the $parent_element and $parent_attr properties were not
being updated. Devs should now be able to filter the button and do checks
against these properties as expected.

Fixes #7531.

Oops. Meant to tag #7532 instead of this ticket!

Last edited 10 months ago by r-a-y (previous) (diff)
Note: See TracTickets for help on using tickets.