Problem/Motivation

In \Drupal\Core\Config\Entity\Query\Condition we process $condition['value'] for operators that do not have $condition['value']. This results in deprecation errors in PHP 8.1 because we pass NULLs to functions that only support strings.

Proposed resolution

Don't call this code for 'IS NULL' and 'IS NOT NULL' operators

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#2 3232695-2.patch1.28 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
1.28 KB

We can only really have test coverage of this once we have testing on PHP 8.1

Status: Needs review » Needs work

The last submitted patch, 2: 3232695-2.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review

#3 was due to a random fail in one of the usual JS tests...

daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • catch committed bd90218 on 9.3.x
    Issue #3232695 by alexpott: Only process values in config entity query...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Nice that some of these are finding actual logic issues.

Committed bd90218 and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.