PHP error: “array_key_exists(): Argument #2 ($array) must be of type array, null given”

Created on 8 October 2025, 6 days ago

Problem/Motivation

When rendering a Canvas page while the Varbase dashboards module is enabled, the following error appears on the page:

An unexpected error has occurred while fetching components.
Error 500: array_key_exists(): Argument #2 ($array) must be of type array, null given
file: /var/www/html/docroot/modules/contrib/varbase_dashboards/src/Plugin/Block/VarbaseContentOverview.php

As a result, Canvas pages fail to render properly, producing a PHP warning and a 500 error.

Steps to reproduce

  1. Enable Varbase Dashboards & Canvas.
  2. Visit the main /canvas/**.
  3. Observe the PHP error in the components side or in the console.

Proposed resolution

Add a type check to ensure all variables are an array before calling array_key_exists().

Remaining tasks

  • ✅ File an issue about this project
  • ❌ Addition/Change/Update/Fix to this project
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Code review from 1 Varbase core team member
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes and Update Helper on new feature change/addition
  • ❌ Release

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇯🇴Jordan n.ghunaim Amman - Jordan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024