Bug 1095758: Fix use of uninitialized value $hostname in Mailer.pm

r=dkl,a=glob


git-svn-id: svn://10.0.0.236/trunk@265671 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org
2014-11-12 20:30:51 +00:00
parent 1cd1e87f99
commit 3add42cdbb
3 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
9206
9207

View File

@@ -1 +1 @@
c0156f20dfd3f5bfa3a0e1c2b6ca0f2de34797a4
e4da3e9bd67ce8c306157eb07ce5c36997af1696

View File

@@ -154,7 +154,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);