From: Koosha KM Date: Wed, 12 Nov 2014 20:13:11 +0000 (+0000) Subject: Bug 1095758: Fix use of uninitialized value $hostname in Mailer.pm X-Git-Tag: bugzilla-5.0rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff42357eb635362c08112968c859a410d53a7e37;p=thirdparty%2Fbugzilla.git Bug 1095758: Fix use of uninitialized value $hostname in Mailer.pm r=dkl,a=glob --- 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);