PHP 8.1 doesn't like unset array indices, like $definition['field_types'] and $definition['settings'] that can be unset.

Change:

      else {
        $field_types = array_merge($field_types, $definition['field_types']);
      }

      $field_info['field_types'] = NestedArray::mergeDeep($field_info['field_types'], $field_types);
      $field_info['settings'] = NestedArray::mergeDeep($field_info['settings'], $definition['settings']);

to:

      else {
        if (isset($definition['field_types'])) {
          $field_types = array_merge($field_types, $definition['field_types']);
        }
      }

      $field_info['field_types'] = NestedArray::mergeDeep($field_info['field_types'], $field_types);
      if (isset($definition['settings'])) {
        $field_info['settings'] = NestedArray::mergeDeep($field_info['settings'], $definition['settings']);
      }

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fonant created an issue. See original summary.

_shY made their first commit to this issue’s fork.

  • _shY committed cfed0e03 on 8.x-2.x
    Issue #3313914 by fonant: PHP 8.1 fixes
    
_shY’s picture

fonant,

Thank you for your time!
Merged to 8.x-2.x-dev!

_shY’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.