- Issue created by @cboyden
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:49pm 4 October 2023 - last update
over 1 year ago 86 pass
PHP 8.0 will be end-of-life in November. Codesniffer found one issue in the module for PHP 8.1.
Run a codesniffer with PHP 8.1 compatibility rules on the module.
Note this error is returned:
FILE: feeds_tamper/plugins/absolute_url.inc
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------
19 | ERROR | The default value of the $flags parameter for htmlentities() was changed from
| | ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For
| | cross-version compatibility, the $flags parameter should be explicitly set.
43 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
51 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
----------------------------------------------------------------------------------------------
The two warnings are not relevant because the code has been updated to skip calling those functions on PHP versions where it's been deprecated.
Update the function call to htmlentities() to explicitly set the flags parameter to ENT_COMPAT, which should produce the same results across all supported PHP versions.
Patch and test.
None.
None.
None.