Skip to:
Content

BuddyPress.org

Changeset 12307


Ignore:
Timestamp:
12/03/2018 09:14:24 PM (3 years ago)
Author:
boonebgorges
Message:

Don't pass non-existent total_count value to notification export filter.

total_count is available only in other contexts where this filter exists.
Instead, we pass a null value.

Props Venutius.
Fixes #8015.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r12305 r12307  
    842842            $content = call_user_func( buddypress()->{$component_name}->notification_callback, $notification->component_action, $notification->item_id, $notification->secondary_item_id, 1, 'string', $notification->id );
    843843        } else {
    844             // The array to reference with apply_filters_ref_array().
     844            /*
     845             * Compile an array of data to send to filter.
     846             *
     847             * Note that a null value is passed in the slot filled by `total_count` in
     848             * other filter contexts. We don't have enough info here to pass a `total_count`.
     849             */
    845850            $ref_array = array(
    846851                $notification->component_action,
    847852                $notification->item_id,
    848853                $notification->secondary_item_id,
    849                 $notification->total_count,
     854                null,
    850855                'string',
    851856                $notification->component_action,
Note: See TracChangeset for help on using the changeset viewer.