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

Created on 28 March 2025, 2 months ago

Steps to reproduce (Problem/Motivation)

I have created a custom block with two contextual filters. first one has the multiple values enabled and the other is a singular value. When cache refreshing i get an error that says:

Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\entity\QueryAccess\ViewsQueryAlter->mapConditions() (line 166 of modules/contrib/entity/src/QueryAccess/ViewsQueryAlter.php).

Proposed resolution

Add a check if the "$field" variable exists in the first place

🐛 Bug report
Status

Active

Version

1.0

Component

Code - misc

Created by

🇳🇱Netherlands gidarai

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

Comments & Activities

  • Issue created by @gidarai
  • 🇳🇱Netherlands gidarai

    Added a patch that fixes the error (small fix)

  • 🇷🇺Russia admiral83

    Добрый день.
    Подскажите , что делать.

    Unable to install CML Starter due to unmet dependencies: core.entity_form_display.commerce_product.product.default (image.style.media_library, maxlength)

Production build 0.71.5 2024