D10: html_entity_decode(): Passing null to parameter #1 (string) is deprecated

Created on 23 December 2022, about 2 years ago
Updated 27 March 2023, almost 2 years ago

Problem/Motivation

The following error appears when going to the Workflow History Tab of an entity in D10:
Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\workflow\WorkflowTransitionListBuilder->buildRow() (line 169 of modules\contrib_jvo\workflow\src\WorkflowTransitionListBuilder.php).
Drupal\workflow\WorkflowTransitionListBuilder->buildRow(Object) (Line: 219)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 186)
Drupal\workflow\WorkflowTransitionListBuilder->render() (Line: 130)
Drupal\workflow\Controller\WorkflowTransitionListController->historyOverview(Object)

Proposed resolution

Make sure that a NULL comment is changed into an empty string: html_entity_decode($transition->getComment() ?? '')

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands johnv

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.

Production build 0.71.5 2024