PageHeaderSubscriber crashes on config import

Created on 22 July 2025, about 1 month ago

Problem/Motivation

I'm getting this on a `drush cim` -- not sure what the circumstances are, as previously it's worked fine.

> TypeError: str_contains(): Argument #1 ($haystack) must be of type string, null given in str_contains() (line 58 of /app/web/modules/contrib/localgov_waste_collection/src/EventSubscriber/PageHeaderSubscriber.php).
[error] TypeError: str_contains(): Argument #1 ($haystack) must be of type string, null given in str_contains() (line 58 of /app/web/modules/contrib/localgov_waste_collection/src/EventSubscriber/PageHeaderSubscriber.php) #0 /app/web/modules/contrib/localgov_waste_collection/src/EventSubscriber/PageHeaderSubscriber.php(58): str_contains(NULL, 'localgov_waste_...')

Steps to reproduce

Proposed resolution

Remove PageHeaderSubscriber completely, and put the text directly into the relevant form or page. It's not very good for performance to run a check on every single route.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024