Problem/Motivation
We are getting deprecation notices on 404 pages
Deprecated function: str_starts_with(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\views\Plugin\views\display\DisplayPluginBase->viewExposedFormBlocks() (line 2642 of core/modules/views/src/Plugin/views/display/DisplayPluginBase.php).
It seems that in the function viewExposedFormBlocks it checks the route name to avoid views_ui. routes, but when \Drupal::routeMatch()->getRouteName() returns null it throws the deprecation notice in str_starts_with.
We are running PHP 8.1 with D10.1.2
Steps to reproduce
todo
Proposed resolution
Check the variable is not empty.
Remaining tasks
/
User interface changes
/
API changes
/
Data model changes
/
Release notes snippet
/