Skip to content

Commit

Permalink
Merge pull request #741 from salaun-urennes1/fix-undefined-value-with…
Browse files Browse the repository at this point in the history
…-modify-list by salaun-urennes1

Fix errors 'Can't use an undefined value as an ARRAY reference' while running sympa.pl --modify_list
  • Loading branch information
ikedas authored Sep 11, 2019
2 parents c34ea0d + 55e1afe commit 4893ee4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sbin/sympa.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -987,15 +987,19 @@ elsif ($main::options{'modify_list'}) {
"\n************************************************************\n";

unless (defined $result->{'ok'}) {
printf STDERR "\n%s\n", join("\n", @{$result->{'string_info'}});
print STDERR "\nThe action has been stopped because of error :\n";
printf STDERR "\n%s\n", join("\n", @{$result->{'string_error'}});
if (defined $result->{'string_error'} && (ref($result->{'string_error'}) eq 'ARRAY')) {
printf STDERR "\n%s\n", join("\n", @{$result->{'string_error'}});
}
exit 1;
}

close INFILE;

printf STDOUT "\n%s\n", join("\n", @{$result->{'string_info'}});
if (defined $result->{'string_info'} && (ref($result->{'string_info'}) eq 'ARRAY')) {
printf STDOUT "\n%s\n", join("\n", @{$result->{'string_info'}});
}

exit 0;
}

Expand Down

0 comments on commit 4893ee4

Please sign in to comment.