Skip to:
Content

BuddyPress.org

Opened 5 weeks ago

Closed 6 days ago

#9232 closed defect (bug) (fixed)

Avoid calling BP_Notifications_Notification if it is not available.

Reported by: dcavins's profile dcavins Owned by: dcavins's profile dcavins
Milestone: 15.0.0 Priority: normal
Severity: normal Version: 14.1.0
Component: Members Keywords: has-patch commit
Cc:

Description

In some code I wrote around site invitations and membership requests, I assume that BP_Notifications_Notification is available to use, even though it might not be. The attached patch check to see if notifications are active before attempting to use the notification class.

Attachments (1)

9232.1.patch (1.8 KB) - added by dcavins 5 weeks ago.
Check that notifications are active before attempting to use the nofitication class.

Download all attachments as: .zip

Change History (4)

@dcavins
5 weeks ago

Check that notifications are active before attempting to use the nofitication class.

#1 @imath
5 weeks ago

  • Keywords commit added

Looks good 👍 Thanks a lot for your catch 💪

This ticket was mentioned in Slack in #buddypress by espellcaste. View the logs.


5 weeks ago

#3 @dcavins
6 days ago

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

In 14041:

Avoid using notifications class if not available.

Check that notifications are active before attempting to use the notification class.

Fixes #9232.

Note: See TracTickets for help on using tickets.