Null Children Array in Field Formatter Base

Created on 14 May 2018, over 6 years ago
Updated 11 April 2024, 9 months ago

Problem/Motivation

The following error message appears:
Argument 1 passed to Drupal\Core\Render\Element::children() must be of the type array, null given, called in /var/www/news-linux.byu.edu/web/core/lib/Drupal/Core/Field/FormatterBase.php on line 84 in Drupal\Core\Render\Element::children() (line 71 of core/lib/Drupal/Core/Render/Element.php).

Proposed resolution

Add a null check before passing the elements variable.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
FieldΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States blakemorgan

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

Production build 0.71.5 2024