From ff42357eb635362c08112968c859a410d53a7e37 Mon Sep 17 00:00:00 2001 From: Koosha KM Date: Wed, 12 Nov 2014 20:13:11 +0000 Subject: [PATCH] Bug 1095758: Fix use of uninitialized value $hostname in Mailer.pm r=dkl,a=glob --- Bugzilla/Mailer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 4447d40462..0b82ded41c 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -116,7 +116,7 @@ sub MessageToMTA { # address, but other mailers won't. my $urlbase = Bugzilla->params->{'urlbase'}; $urlbase =~ m|//([^:/]+)[:/]?|; - $hostname = $1; + $hostname = $1 || 'localhost'; $from .= "\@$hostname" if $from !~ /@/; $email->header_set('From', $from); -- 2.47.3