Skip to content

Commit 3f849aa

Browse files
XilefNoriSergey BoborykinGrahamCampbell
authored
Fix Message::bodySummary when preg_match fails (#554)
Co-authored-by: Sergey Boborykin <sergey.boborykin@lamoda.ru> Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
1 parent 9f925b5 commit 3f849aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Message.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function bodySummary(MessageInterface $message, int $truncateAt =
7777

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

0 commit comments

Comments
 (0)