Check $key is set before entity load in Selective::getOids

Created on 18 March 2025, 18 days ago

Problem/Motivation

If the key is null due to some bad data then there is a fatal exception.

Proposed resolution

Instead of

$entity = $entityTypeStorage->load($key);

do

$entity = $key ? $entityTypeStorage->load($key) : NULL;
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom dahousecat

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