Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /app/web/core/lib/Drupal/Core/Database/Connection.php on line 1525

Created on 7 February 2023, almost 2 years ago
Updated 9 February 2023, almost 2 years ago

Problem/Motivation

Using PHP 8.1, creating new node will yield:
Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /app/web/core/lib/Drupal/Core/Database/Connection.php on line 1525

Steps to reproduce

Using PHP 8.1, creating new node will yield:
Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /app/web/core/lib/Drupal/Core/Database/Connection.php on line 1525

Proposed resolution

Check if entity has id(), before passing the entity on for further processing.

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇪🇪Estonia hkirsman

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

Comments & Activities

Production build 0.71.5 2024