Skip to content

Commit

Permalink
Ignoring invalid recipients on email read
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Eyacher <p.eyacher@teleport.ch>
  • Loading branch information
PEyacher committed Aug 29, 2024
1 parent 6d1c33d commit 4a70109
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Header/AbstractAddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ static function ($value) use (&$wasEncoded): ?Address {
],
$value
);
return empty($value) ? null : Address::fromString($value, $comments);
try {
return Address::fromString($value, $comments);
} catch (\Laminas\Mail\Exception\InvalidArgumentException $e) {

Check failure on line 123 in src/Header/AbstractAddressList.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Class \Laminas\Mail\Exception\InvalidArgumentException should not be referenced via a fully qualified name, but via a use statement.
// ignore invalid addresses
return null;
}
},
$values
);
Expand Down

0 comments on commit 4a70109

Please sign in to comment.