Deprecated function: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Database\Connection->escapeLike()

Created on 12 July 2022, almost 2 years ago
Updated 19 June 2023, about 1 year ago

Problem/Motivation

With PHP 8.1 the reference form throws deprecation warnings when validating the contributor field.

Steps to reproduce

Proposed resolution

Make sure to not pass NULL to contributor name part query conditions in class ContributorSelection. This will stop the warning and improve performance by not needlesly adding a no-op LIKE condition to the query.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Eric_A

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024