Skip to content

Commit 1d19aa4

Browse files
committed
AC-10269: Gift registry frontend enhancements
* Code refinements
1 parent d91e49a commit 1d19aa4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/Magento/Framework/Mail/EmailMessage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ private function convertAddressArrayToAddressList(array $arrayList): AddressList
276276
*/
277277
private function sanitiseEmail(?string $email): ?string
278278
{
279-
if (!empty($email) && str_contains($email, '=?')) {
280-
$decodedValue = trim(iconv_mime_decode($email, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'));
281-
if ($this->isEncoded(trim($email), $decodedValue)) {
279+
if (!empty($email) && str_starts_with($email, '=?')) {
280+
$decodedValue = iconv_mime_decode($email, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8');
281+
if ($this->isEncoded($email, $decodedValue)) {
282282
$email = strtolower(str_replace('=22', '', $email));
283283
}
284284
}

0 commit comments

Comments
 (0)