- Issue created by @cboyden
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:49pm 6 September 2023 - Open on Drupal.org βCore: 7.x + Environment: PHP 8.2 & MySQL 8last update
over 1 year ago Waiting for branch to 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 Tablefield module.
Note this error is returned:
tablefield/tablefield.module
----------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------
1004 | ERROR | The default value of the $flags parameter for htmlspecialchars() 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.
1848 | WARNING | INI directive 'auto_detect_line_endings' is deprecated since PHP 8.1
1849 | WARNING | INI directive 'auto_detect_line_endings' is deprecated since PHP 8.1
1879 | WARNING | INI directive 'auto_detect_line_endings' is deprecated since PHP 8.1
2577 | ERROR | The default value of the $flags parameter for htmlspecialchars() 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.
----------------------------------------------------------------------------------------
Update the function call to htmlspecialchars()
to explicitly set the flags parameter to ENT_COMPAT, which should produce the same results across all supported PHP versions.
There are also deprecation warnings about auto_detect_line_endings
. This is deprecated in PHP 8.1 but will not be removed until PHP 9.0, which won't be required until after Drupal 7 EOL.
Patch and test.
None.
None.
None.
Needs review
3.0
Code