Avoid TypeError if config entity dependencies are NULL

Created on 10 July 2024, about 2 months ago
Updated 7 August 2024, about 1 month ago

Problem/Motivation

We noticed an error on the 10.3 update when trying to resave config entities, the affected sites has some invalid definitions with NULL instead of an empty array, which results in:

[error]  TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in array_intersect_key() (line 378 of /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php) #0 /var/www/html/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(378): array_intersect_key(NULL, Array)

Steps to reproduce

Proposed resolution

Add a ?? [] to avoid this. There might be other checks later on, didn't get that far yet.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Fixed

Version

10.3 โœจ

Component
Configuration entityย  โ†’

Last updated 2 days ago

Created by

๐Ÿ‡จ๐Ÿ‡ญSwitzerland Berdir Switzerland

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024