Skip to content

Commit

Permalink
Fix Message::bodySummary when preg_match fails (#554)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey Boborykin <sergey.boborykin@lamoda.ru>
Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 17, 2023
1 parent 9f925b5 commit 3f849aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function bodySummary(MessageInterface $message, int $truncateAt =

// Matches any printable character, including unicode characters:
// letters, marks, numbers, punctuation, spacing, and separators.
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) {
return null;
}

Expand Down

0 comments on commit 3f849aa

Please sign in to comment.