Skip to:
Content

BuddyPress.org

Changeset 7173


Ignore:
Timestamp:
06/06/2013 11:33:23 PM (11 years ago)
Author:
boonebgorges
Message:

Use is_callable() to validate notification_callback

This allows the full gamut of callable formats to be used as notification
callbacks - eg, array( $my_object, 'my_callback' )

Fixes #4860

Props sbrajesh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-notifications.php

    r6342 r7173  
    120120
    121121            // Callback function exists
    122             if ( isset( $bp->{$component_name}->notification_callback ) && function_exists( $bp->{$component_name}->notification_callback ) ) {
     122            if ( isset( $bp->{$component_name}->notification_callback ) && is_callable( $bp->{$component_name}->notification_callback ) ) {
    123123
    124124                // Function should return an object
Note: See TracChangeset for help on using the changeset viewer.