ypeError: Argument 1 passed to Drupal\Core\Render\Element::children() must be of the type array, null given, called in /var/www/html/web/core/lib/Drupal/Core/Field/FormatterBase.php on line 93

Created on 1 July 2024, 6 months ago

Problem/Motivation

TypeError: Argument 1 passed to Drupal\Core\Render\Element::children() must be of the type array, null given, called in /var/www/html/web/core/lib/Drupal/Core/Field/FormatterBase.php on line 93

Steps to reproduce

It happened when I tried to render a value of the Rating Field (StarRatingValueFormatter) in a View display when the starrating field was empty for the entity.

Proposed resolution

\Drupal\starrating\Plugin\Field\FieldFormatter\StarRatingValueFormatter::viewElements method has to return an array always.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine nikita_tt

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024