Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When upgrading to PHP8, I got this warning:
FILE: path_breadcrumbs/path_breadcrumbs_ui/path_breadcrumbs_ui.module
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
949 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter $buttons is optional, while parameter $form_name is required.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Upgrade server to PHP8, then run a drush command and see warning.
Proposed resolution
Update parameters in function declaration.
Comment | File | Size | Author |
---|---|---|---|
path_breadcrumbs-php8.patch | 948 bytes | shkiper |
Issue fork path_breadcrumbs-3277689
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
arx-e CreditAttribution: arx-e commentedI got this warning with php 8.1 on every page. I applied the patch and I don;t see any issues.
Comment #5
claudiu.cristeaTested and is fixing the issue. Thanks
Comment #6
VladimirAus+1. RTBC