Skip to:

Opened 2 years ago

Closed 2 years ago

Last modified 20 months ago

#8390 closed defect (bug) (fixed)

PHP8 no longer accepts a function required parameter to follow an optional one

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 7.0.0 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch


Testing BuddyPress on PHP8 using this tutorial available on the Call for testing: PHP 8.0 and this custom docker-compose.override.yml (Absolute paths need to be customize according yours), I've found one of our function was generating this deprecated notice.

Attachments (1)

8390.patch (888 bytes) - added by imath 2 years ago.

Download all attachments as: .zip

Change History (2)

2 years ago

#1 @imath
2 years ago

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

In 12780:

Prevent a PHP 8.0 deprecated notice about optional function argument

The bp_admin_get_wp_nav_menu_items() funciton was introduced in 7.0.0 to fix an issue with the BuddyPress Members WP Nav Menu items. It was wrongly using an optional argument before a required one. As PHP 8.0 no longer accepts this practice, both arguments of the function will be required 😇.

Fixes #8390

Note: See TracTickets for help on using tickets.