Skip to content

Commit

Permalink
Silence warnings from Email::Address::XS when validating
Browse files Browse the repository at this point in the history
Do not immediately evaluate `$addr` to prevent `Argument contains empty
address` warnings from Email::Address::XS; instead, use
`$addr->is_valid`.
  • Loading branch information
zakame committed Jun 30, 2018
1 parent f0ba169 commit a7499bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SVN/Notify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ sub output_headers {
$norm = sub {
return join ', ' => map {
my ($addr) = Email::Address::XS->parse($_);
if ($addr) {
if ($addr->is_valid) {
if (my $phrase = $addr->phrase) {
$addr->phrase(Encode::encode( 'MIME-Q', $phrase ));
}
Expand Down

0 comments on commit a7499bc

Please sign in to comment.