We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f096f26 + 1f342ae commit bab7208Copy full SHA for bab7208
src/Message.php
@@ -324,7 +324,7 @@ public function getText(): ?string
324
*/
325
public function setText(?string $text): void
326
{
327
- if (preg_match('//u', $text) !== 1) {
+ if (preg_match('//u', $text ?? '') !== 1) {
328
throw new InvalidArgumentException("message body contains an invalid UTF-8 byte sequence");
329
}
330
@@ -346,7 +346,7 @@ public function getHTML(): ?string
346
347
public function setHTML(?string $html): void
348
349
- if (preg_match('//u', $html) !== 1) {
+ if (preg_match('//u', $html ?? '') !== 1) {
350
351
352
0 commit comments