PHP ParseError on module enable: Unexpected ')' in RenameAdminPathsSettingsForm.php line 65 (8.x-2.2)

Created on 22 April 2025, 23 days ago

Problem/Motivation

The module `rename_admin_paths` fails to enable due to a PHP syntax error in the file:
/src/Form/RenameAdminPathsSettingsForm.php
Specifically, this occurs at line 65, where a trailing comma is used after the last function parameter.

This prevents enabling the module via Drush or the Drupal admin interface.

The error message:
ParseError: syntax error, unexpected ')', expecting variable (T_VARIABLE)

Steps to reproduce

1. Install the rename_admin_paths module version 8.x-2.2.
2. Run the command:
drush en rename_admin_paths
3. Observe the fatal ParseError.

Proposed resolution

Edit the method definition at line 65 in RenameAdminPathsSettingsForm.php to remove the trailing comma after the last argument.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

๐Ÿ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

๐Ÿ‡ธ๐Ÿ‡ฆSaudi Arabia abdulaziz zaid Riyadh

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024