hook update 8302 should check if ignored_config_entities return array or null

Created on 1 March 2024, 4 months ago
Updated 28 April 2024, about 2 months ago

Problem/Motivation

After upgrading to config_ignore 3 and trying to deploy to a site with config_ignore enabled where the configuration is still empty (ignored_config_entities is an empty array) the hook update 8302 fails with the following error:

Argument #2 ($data) must be of type array, null given, called in /var/www/html/web/modules/contrib/config_ignore/config_ignore/config_ignore.install on line 39

After checking, it seems that it does not check if $config->get('ignored_config_entities') returns an array or null. I propose a simple solution in MR.

Steps to reproduce

- Update code from 2.x to 3.x with the module enabled with the default config
- Run drush updatedb

Proposed resolution

Check If $config->get('ignored_config_entities') returns null, and return an empty array in that case.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain Juanjol Navarra

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

Comments & Activities

Production build 0.69.0 2024