Deprecated function: preg_match(): Passing null

Created on 1 June 2023, over 1 year ago
Updated 2 June 2023, over 1 year ago

Problem/Motivation

Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\entity_field_condition\Plugin\Condition\NodeField->evaluate() (line 336 of modules/contrib/entity_field_condition/src/Plugin/Condition/NodeField.php).

Steps to reproduce

Create a context that uses a comparison to a field, use that context to render a block, visit a page where the block is placed (in our case in layout builder) and where the comparison field is empty

Proposed resolution

Check if parameter 2 is null before comparing

🐛 Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

🇳🇿New Zealand roxflame

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

Comments & Activities

Production build 0.71.5 2024