Problem/Motivation

When upgrading to PHP8, I got this warning:


FILE: /taxonomy_manager/taxonomy_manager.admin.inc
------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------------------
 864 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $tid is optional, while parameter $vid1 is required.
------------------------------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Upgrade server to PHP8, then run a drush command and see warning.

Proposed resolution

Update parameters in function declaration.

Comments

shkiper created an issue. See original summary.

vladimiraus’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Thanks @shkiper

ethomas08’s picture

The patch works in PHP 7 and 8 environments but not on PHP 5. Uploading a patch that works for my old legacy project.

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thank you! Committed! 🥂

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.