Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecations for preg_match, preg_replace_callback and null argument #385

Open
derikb opened this issue Sep 29, 2023 · 0 comments
Open

Deprecations for preg_match, preg_replace_callback and null argument #385

derikb opened this issue Sep 29, 2023 · 0 comments

Comments

@derikb
Copy link

derikb commented Sep 29, 2023

Seeing this in php8.2

1 PHP Deprecated:  preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php on line 57
1 PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php on line 373
1 PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php on line 139

Looks like all are cases of the code expecting a string but somewhere allowing null.

php docs do not indicate when this was deprecated, just indicates those parameters should be string|array.

Probably somewhere further up the stack a null check could clear this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant