Problem/Motivation

On PHP 8.1, when a cell value is NULL it triggers a deprecation error since passing NULL to html_entity_decode is no longer valid.
Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Html::decodeEntities()

Proposed resolution

We could type cast $cell_value to string to ensure a valid type.

Comments

Aerzas created an issue. See original summary.

aerzas’s picture

Status: Active » Needs review
Issue tags: +Needs review
StatusFileSize
new477 bytes

Here is a patch proposal.

  • grasmash committed 18c9d54 on 3.x authored by Aerzas
    Issue #3272884 by Aerzas: html_entity_decode(): Passing null to...

  • grasmash committed d448295 on 8.x-2.x authored by Aerzas
    Issue #3272884 by Aerzas: html_entity_decode(): Passing null to...
grasmash’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.