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

Message::setHTML will produce deprecation warnings in PHP 8 if null is passed #15

Open
vortrixs opened this issue Oct 25, 2022 · 0 comments

Comments

@vortrixs
Copy link
Contributor

mail/src/Message.php

Lines 347 to 351 in 92f2ce0

public function setHTML(?string $html): void
{
if (preg_match('//u', $html) !== 1) {
throw new InvalidArgumentException("message body contains an invalid UTF-8 byte sequence");
}
This will trigger a deprecation warning if null is passed because preg_match only accepts strings as of PHP 8.

Error: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated

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