Skip to content

Commit

Permalink
Case-insensitive comparing =?utf-8?Q?
Browse files Browse the repository at this point in the history
  • Loading branch information
Minatulaev Roman Olegovich authored and morismor committed May 25, 2020
1 parent 65ec8fb commit 1738657
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/MailHog.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,10 @@ protected function getDecodedEmailProperty($email, $property): string
{
if ((string) $property !== '') {
if (!empty($email->Content->Headers->{'Content-Transfer-Encoding'}) && in_array(
'quoted-printable',
$email->Content->Headers->{'Content-Transfer-Encoding'},
true
)
'quoted-printable',
$email->Content->Headers->{'Content-Transfer-Encoding'},
true
)
) {
$property = quoted_printable_decode($property);
}
Expand All @@ -457,7 +457,7 @@ protected function getDecodedEmailProperty($email, $property): string
) {
$property = quoted_printable_decode($property);
}
if (strpos($property, '=?utf-8?Q?') !== false && extension_loaded('mbstring')) {
if (stripos($property, '=?utf-8?Q?') !== false && extension_loaded('mbstring')) {
$property = mb_decode_mimeheader($property);
}
}
Expand Down Expand Up @@ -531,4 +531,4 @@ protected static function sortEmailsByCreationDatePredicate($emailA, $emailB): i

return ($sortKeyA > $sortKeyB) ? -1 : 1;
}
}
}

0 comments on commit 1738657

Please sign in to comment.