Skip to:
Content

BuddyPress.org

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: andrewza's profile andrewza 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)

#1 @andrewza
2 years ago

  • Version set to 11.0.0

#2 @andrewza
2 years ago

  • Summary changed from bp_get_send_message_button_args to bp_get_send_message_button_args throws warning when returning non-array value

#3 @andrewza
2 years ago

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.

#4 @imath
2 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi @andrewza

Thanks for your report, the [13410] fix will be included into next minor: 11.1.0 👍

Note: See TracTickets for help on using tickets.