Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294415

Deprecated function: str_starts_with(): Passing null to parameter #1 ($haystack) of type string is deprecated

$
0
0

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

/


Viewing all articles
Browse latest Browse all 294415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>