Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 2 years ago

#9232 closed defect (bug) (fixed)

Avoid calling BP_Notifications_Notification if it is not available.

Reported by: dcavins Owned by: dcavins
Priority: normal Milestone: 15.0.0
Component: Members Version: 14.1.0
Severity: normal 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 2 years ago.
Check that notifications are active before attempting to use the nofitication class.

Download all attachments as: .zip

Change History (4)

@dcavins
2 years ago

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

#1 @imath
2 years 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.


2 years ago

#3 @dcavins
2 years ago

  • Resolution → fixed
  • Status assigned → 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.