[wp-trac] [WordPress Trac] #53465: PHP 8.1.: the default value of the flags parameter for htmlentities() et all needs to be explicitly set
WordPress Trac
noreply at wordpress.org
Wed Mar 30 11:44:12 UTC 2022
#53465: PHP 8.1.: the default value of the flags parameter for htmlentities() et
all needs to be explicitly set
-------------------------------+-------------------------------
Reporter: jrf | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.0
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-patch php81 | Focuses: coding-standards
-------------------------------+-------------------------------
Comment (by jrf):
Replying to [comment:3 GaryJ]:
> According to https://www.php.net/manual/en/function.htmlentities.php,
the default for flags for PHP 8.1 was "changed from `ENT_COMPAT` to
`ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401`".
>
> I don't know what difference that `ENT_HTML401` might make (there's also
a `ENT_HTML5` flag available as well), but might be something else to
consider.
The `ENT_HTML401` makes no difference as the value of that constant is
`0`, so the "bit" value remains the same with or without.
The `ENT_HTML401` part is not an actual change, just better documentation.
See:
* https://github.com/php/doc-en/pull/361#issuecomment-925931381
* https://github.com/php/php-src/pull/7514
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53465#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list