- Issue created by @hargobind
- Status changed to Needs review
over 1 year ago 1:36am 9 June 2023 - πΊπΈUnited States hargobind Austin, Texas
Attached is a simple patch to fix this.
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
Upgrade to PHP 8.
Create a path metatag, and visit the page.
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
.
Needs review
1.0
Code
Attached is a simple patch to fix this.