TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys()

Created on 12 May 2025, 3 days ago

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!! Delete parts not applicable !!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Problem/Motivation

When upgrading to Drupal 10 or visiting a view and the getParentFieldViewsData returns NULL an error ( see title ) is thrown.

Steps to reproduce

`drush updb` | `drush cr` | visit a specific view

Proposed resolution

Return an empty array if getParentFieldViewsData returns null in fieldViewsData;

Remaining tasks

Create patch

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Bugfix array_keys() with NULL imput.

Checklist ✔

  • [ ❌ ] Changeset meets coding standards and project style guide .
  • [ ❌ ] Changeset has tests
  • [ ❌ ] Proposal has been discussed externally (Slack/IRC)
🐛 Bug report
Status

Active

Version

3.8

Component

Code

Created by

🇳🇱Netherlands scuba_fly Netherlands, Vinkeveen

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

Comments & Activities

Production build 0.71.5 2024