Commit 7ddbface authored by sikeda's avatar sikeda
Browse files

[-bug] Suppress warnings on uninitialized value.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12105 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent e28e39a2
......@@ -11654,10 +11654,12 @@ sub do_editsubscriber {
$param->{'current_subscriber'}{'last_bounce'} =
$language->gettext_strftime("%d %b %Y", localtime($bounce[1]));
$param->{'current_subscriber'}{'bounce_count'} = $bounce[2];
if ($bounce[3] =~ /^(\d+\.(\d+\.\d+))$/) {
if ($bounce[3] and $bounce[3] =~ /^(\d+\.(\d+\.\d+))$/) {
$subscriber->{'bounce_code'} = $1;
$subscriber->{'bounce_status'} =
$Sympa::Tools::WWW::bounce_status{$2};
} else {
$subscriber->{'bounce_status'} = $bounce[3];
}
 
$param->{'previous_action'} = $in{'previous_action'};
......
......@@ -1633,14 +1633,14 @@ sub _fix_html_part {
my $robot = shift;
return $entity unless $entity;
my $eff_type = $entity->head->mime_attr("Content-Type");
my $eff_type = $entity->head->mime_type || ''; # Use real content-type.
if ($entity->parts) {
my @newparts = ();
foreach my $part ($entity->parts) {
push @newparts, _fix_html_part($part, $robot);
}
$entity->parts(\@newparts);
} elsif ($eff_type =~ /^text\/html/i) {
} elsif ($eff_type eq 'text/html') {
my $bodyh = $entity->bodyhandle;
# Encoded body or null body won't be modified.
return $entity if !$bodyh or $bodyh->is_encoded;
......
......@@ -2049,14 +2049,11 @@ sub _canonicalize_status {
# $rcpt : the email address recognized in the bounce itself. In most case
# $rcpt eq $bouncefor
sub _update_subscriber_bounce_history {
$log->syslog('debug', '(%s, %s, %s, %s)', @_);
my $list = shift;
my $rcpt = shift;
my $bouncefor = shift;
my $status = shift;
$log->syslog('debug', '(%s, %s, %s, %s)',
$list->{'name'}, $rcpt, $bouncefor, $status);
my $status = shift || '';
my $first = my $last = time;
my $count = 0;
......@@ -2082,7 +2079,8 @@ sub _update_subscriber_bounce_history {
$bouncefor, $first, $last, $count, $status, $rcpt);
$list->update_list_member(
$bouncefor,
{ 'bounce' => "$first $last $count $status",
{ 'bounce' =>
sprintf('%s %s %s %s', $first, $last, $count, $status),
'bounce_address' => $rcpt
}
);
......@@ -2097,8 +2095,12 @@ sub _update_subscriber_bounce_history {
'error_type' => $status
);
} else {
$list->update_list_member($bouncefor,
{'bounce' => "$first $last $count $status"});
$list->update_list_member(
$bouncefor,
{ 'bounce' =>
sprintf('%s %s %s %s', $first, $last, $count, $status)
}
);
$log->syslog('notice',
'Received bounce for email address %s, list %s',
$bouncefor, $list->{'name'});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment