Opened 2 years ago
Closed 2 years ago
#8827 closed defect (bug) (fixed)
bp_get_send_message_button_args throws warning when returning non-array value
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 11.0.0 |
Component: | Members | Keywords: | |
Cc: |
Description
Filtering on the 'bp_get_send_message_button_args' (and other hooks that adds buttons to the profile page) can cause warnings when trying to remove these buttons programmatically with PHP
Example - add_filter( 'bp_get_send_public_message_button', '__return_false' );
, or even returning an empty string or empty array throws warnings.
Trying to access array offset on value of type bool in /wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/members/template-tags.php on line 371
Change History (4)
Note: See
TracTickets for help on using
tickets.
Just updating here, this is resolved in V12 alpha. Not sure if it's worth fixing in V11 (or if there will be a minor release between 11 and 12).
Happy to mark this as closed.