kodus / mail

Simple, modern library of services for sending UTF-8 e-mail
38 stars 5 forks source link

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

Open vortrixs opened 2 years ago

vortrixs commented 2 years ago

https://github.com/kodus/mail/blob/92f2ce02538413a369136b3f91664984d50f7d98/src/Message.php#L347-L351 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