Skip to:
Content

BuddyPress.org

#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 23 months ago.
Check that notifications are active before attempting to use the nofitication class.

Download all attachments as: .zip

Change History (4)

@dcavins
23 months ago

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

#1 @imath
23 months 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.


23 months ago

#3 @dcavins
22 months ago

  • Resolutionfixed
  • Status assignedclosed

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.