mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-13 08:41:13 -06:00
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>
This commit is contained in:
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…
x
Reference in New Issue
Block a user