Argument #2 must be of type array, null given in address.post_update.php

Created on 16 December 2024, about 2 months ago

Problem/Motivation

When I upgrade address module from the version 1.12.0 to 2.0.2 by drush command line updatedb (updb) for preparing update Drupal core version to 10.x, I face the following error:

TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /web/modules/contrib/address/address.post_update.php on line 20 #0 [internal function]: {closure}(Object(Drupal\Core\Entity\Entity\EntityFormDisplay))

Steps to reproduce

  • Drupal version 9.5.11
  • PHP 8.1
  • Address is upgraded by composer with the version 2.0.2

Run drush command line

drush updb -y

Proposed resolution

Update the coding to check type of component is array before continuing update.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇻🇳Vietnam phannphong Ho Chi Minh City

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

Comments & Activities

Production build 0.71.5 2024