Skip to:
Content

BuddyPress.org

Opened 20 months ago

Closed 20 months ago

Last modified 19 months ago

#8800 closed defect (bug) (fixed)

Avoid potential PHP errors when using BuddyPress buttons on front end

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 11.1.0 Priority: high
Severity: major Version: 11.0.0
Component: Templates Keywords: has-patch
Cc:

Description

[13299], [13300], [13301], [13302] & [13303] introduced a potential regression if the corresponding button arguments filter is used by some custom code like:

add_filter( 'bp_get_send_public_message_button', '__return_false' );

This was reported @fantamily by here: https://buddypress.org/support/topic/say-hi-to-buddypress-11-0-0-la-scala/#post-328004

Returning false to one the button arguments filter has two different effects depending on the active template pack:

  • Legacy -> fatal error (Uncaught TypeError)
  • Nouveau -> Warning (Trying to access array offset on value of type bool)

Change History (5)

This ticket was mentioned in PR #59 on buddypress/buddypress by @imath.


20 months ago
#1

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


20 months ago

#3 @imath
20 months ago

In 13409:

Prevent a Members single view header action button filters wrong use

Some custom code/plugins might wrongly use something else than an array
(eg: false) to disable one of the action buttons shown inside the single
Members view header. Changes made during the 11.0.0 release revealed this
potential issue.

See #7126
See #8800 (Trunk)

#4 @imath
20 months ago

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

In 13410:

Prevent a Members single view header action button filters wrong use

Some custom code/plugins might wrongly use something else than an array
(eg: false) to disable one of the action buttons shown inside the single
Members view header. Changes made during the 11.0.0 release revealed this
potential issue.

See #7126
Closes https://github.com/buddypress/buddypress/pull/59
Fixes #8800 (branch 11.0)

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


19 months ago

Note: See TracTickets for help on using tickets.