- Issue created by @joelpittet
- Merge request !5113Issue #3396440: [D7 PHP 8.1] html_entity_decode(): Passing null to parameter in decode_entities() → (Open) created by joelpittet
- Open on Drupal.org →Environment: PHP 8.2 & MySQL 8last update
about 1 year ago Not currently mergeable. - Status changed to Needs review
about 1 year ago 8:57pm 24 October 2023 - last update
about 1 year ago 2,161 pass - First commit to issue fork.
- last update
about 1 year ago 2,161 pass - Status changed to RTBC
about 1 year ago 12:11pm 14 November 2023 - 🇺🇦Ukraine tibezh
Looks good.
The patch covers really important things to support PHP 8.1 on D7. - last update
about 1 year ago run-tests.sh exception - last update
about 1 year ago 2,163 pass - last update
about 1 year ago run-tests.sh exception - last update
about 1 year ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - last update
12 months ago 2,163 pass - 🇸🇰Slovakia poker10
I think this looks good. This code
var_dump(html_entity_decode(NULL, ENT_QUOTES, 'UTF-8'));
in PHP 8.3, 8.2, 8.1 results in:
Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated string(0) ""
and in PHP 7.4, 7.3 and lower in:
string(0) ""
So by casting to string we will keep the same behavior of this function - an empty string will be returned without a deprecation message.
I have added a NULL value to the existing tests. Seems like all pipelines are green (https://git.drupalcode.org/project/drupal/-/pipelines/59079), so adding a tag for the final review. Here is a test-only test which failed as expected: https://git.drupalcode.org/project/drupal/-/jobs/434910. Thanks.
- Status changed to Fixed
12 months ago 11:03am 5 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.