Created on 9 June 2023, over 1 year ago

Problem/Motivation

When switching my site to run on PHP 8, I get the following error:

Deprecated: Required parameter $form_name follows optional parameter $buttons in /home/user/www/sites/all/modules/path_metatags/path_metatags_ui/path_metatags_ui.module on line 824

This link explains how this was deprecated:
https://php.watch/versions/8.0/deprecate-required-param-after-optional

Steps to reproduce

Upgrade to PHP 8.
Create a path metatag, and visit the page.

Proposed resolution

Given the function signature:
_path_metatags_ui_form_attach_buttons(&$form, $buttons = array(), $form_name)
I believe the intention of array() was to indicate an expected type.
If that's true, then the fix is to write the parameter as array $buttons.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States hargobind Austin, Texas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024