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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | csv_serialization-html_entity_decode_passing_null-3272884-2.patch | 477 bytes | aerzas |
Comments
Comment #2
aerzas commentedHere is a patch proposal.
Comment #5
grasmash commented