Problem
RedirectLogoutSettings::__construct() type-hints the $module_handler parameter with the concrete ModuleHandler class instead of ModuleHandlerInterface.
This causes a fatal error when another module (e.g. hook_event_dispatcher) decorates the module_handler service, because the decorated service no longer passes the instanceof ModuleHandler check.
Steps to reproduce
- Install redirect_after_logout 2.0.0 on Drupal 11
- Install a module that decorates the module_handler service
- Visit /admin/config/system/redirect_after_logout
- Fatal error: Argument #3 must be of type ModuleHandler, given ...
Proposed resolution
Replace ModuleHandler with ModuleHandlerInterface in the use statement, docblock, and constructor parameter.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| redirect_after_logout-modulehandlerinterface-3612345-1.patch | 1.04 KB | ramcodev |
Issue fork redirect_after_logout-3606737
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
ramcodev commentedComment #5
mukeshaddweb commented