No enabled_entity_types configed crashes site

Created on 12 October 2023, about 1 year ago
Updated 11 March 2024, 8 months ago

Problem/Motivation

After upgrading module, running database updates and first export and then importing config module creates a crash "TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /contrib/rabbit_hole/rabbit_hole.module on line 44". This looks to be because this site runs the module but with no enabled entity types in the config, and that is probably not a common occurrence.

Reproduce

On a system with no previous enabled entity type configs upgrade module, run db update, followed by import then export of config.

Solution

Should be enough to just check that $entity_types is not NULL and in that case set it as an empty array.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden VAnnergard

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

Comments & Activities

Production build 0.71.5 2024