Error on new installation: Argument #1 ($array) must be of type array, null given in array_keys()

Created on 27 February 2025, 5 months ago

Problem/Motivation

Steps to reproduce

  1. Install a fresh Drupal instance.
  2. Enable the field_permissions module.
  3. Try to change configuration of any field

Proposed resolution

Update the getPermissions() method to ensure $permissions is always an array before calling array_keys(), e.g.:

$permissions = $permissions ?? [];
🐛 Bug report
Status

Needs review

Version

1.4

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024