git-send-email.perl: ensure $domain is defined before using it
valid_fqdn() may attempt to operate on an undefined value if Net::Domain::domainname fails to determine the domain name. This causes perl to emit unpleasant warnings. So, add a check for whether $domain has been defined before using it. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
b822423ed2
commit
61ef5e9b56
|
@ -895,7 +895,7 @@ sub sanitize_address {
|
||||||
|
|
||||||
sub valid_fqdn {
|
sub valid_fqdn {
|
||||||
my $domain = shift;
|
my $domain = shift;
|
||||||
return !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
|
return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub maildomain_net {
|
sub maildomain_net {
|
||||||
|
|
Loading…
Reference in New Issue