Problem/Motivation
This is a problem with PHP 7.
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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | rename-admin-paths-parse-error-3520457-2.patch | 1.44 KB | abdulaziz zaid |
Issue fork rename_admin_paths-3520457
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
abdulaziz zaidFixed syntax error, works fine now. You can try the patch.
Comment #6
ptmkenny commentedComment #7
ptmkenny commentedComment #9
ptmkenny commented