ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.02k stars 323 forks source link

PHP 8.3 deprecate second param to array_keys #387

Open andrewnicols opened 8 months ago

andrewnicols commented 8 months ago

As noted in the RFC PHP 8.3 deprecates the second parameter to array_keys() to apply a filter.

The following uses of a second filter param to array_keys can be found in tcpdf:

The suggestion is to combine array_keys and array_filter. A new method may be added in PHP 8.4 but does not exist yet.

library/HTMLPurifier/Lexer/PH5P.php:                            $marker = end(array_keys($this->a_formatting, self::MARKER, true));
maintenance/PH5P.php:                        $marker = end(array_keys($this->a_formatting, self::MARKER, true));