Opened 13 years ago
Closed 13 years ago
#3434 closed defect (bug) (fixed)
$secondary_item_id is no longer optional in delete_for_user_by_item_id
Reported by: | enderandrew | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Core | Keywords: | |
Cc: |
Description
As per the comment for this function:
- @param integer $secondary_item_id (optional) The secondary item id of the notifications that we wish to use to delete.
The function changed from:
function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false )
to
function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false )
So now you can't call this function without passing a fifth parameter, which breaks plugins. If this change was intentional, the comment/description for the function needs to change.
Change History (2)
Note: See
TracTickets for help on using
tickets.
I'm not seeing where it was every $secondary_item_id = false https://buddypress.trac.wordpress.org/browser/trunk/bp-core/bp-core-classes.php?annotate=blame&rev=4917#L773
However, there is a bit of logic in the function that accounts for the case where it's not passed. So it makes sense to put a default value in there.