Opened 4 years ago
Closed 4 years ago
#8827 closed defect (bug) (fixed)
bp_get_send_message_button_args throws warning when returning non-array value
| Reported by: | andrewza | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Members | Version: | 11.0.0 |
| Severity: | normal | 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.