Return value must be of type array, null returned in LayoutBlockFinder.php

Created on 23 August 2024, 3 months ago
Updated 18 September 2024, 2 months ago

Problem/Motivation

Getting the following error when installing module and navigating to Block Usage Report page:

TypeError: Drupal\block_usage_report\LayoutBlockFinder::getDefaultLayoutBlocks(): Return value must be of type array, null returned in Drupal\block_usage_report\LayoutBlockFinder->getDefaultLayoutBlocks() (line 75 of /Users/farahsabbagh/Sites/devdesktop/treasury-dev/docroot/modules/contrib/block_usage_report/src/LayoutBlockFinder.php).

Steps to reproduce

Install and enable Block Usage Report module
Navigate to /admin/reports/block-usage
Observe WSOD with above error

Proposed resolution

Adjusting initial array from NULL to []; seems to resolve issue.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fsayoub

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

Comments & Activities

Production build 0.71.5 2024