You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2019/11/24 19:41:30 UTC

svn commit: r1870343 - in /spamassassin: branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Author: gbechis
Date: Sun Nov 24 19:41:30 2019
New Revision: 1870343

URL: http://svn.apache.org/viewvc?rev=1870343&view=rev
Log:
fix a warning

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1870343&r1=1870342&r2=1870343&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/PerMsgStatus.pm Sun Nov 24 19:41:30 2019
@@ -811,11 +811,12 @@ underscores, used in meta rules.
 
 sub get_array_names_of_subtests_hit {
   my ($self, $mode) = @_;
+  my @result;
 
   if (defined $mode && $mode eq 'dbg') {
     # This routine prints only one instance of a subrule hit with a count of how many times it hit if greater than 1
     my $total_hits = scalar(@{$self->{subtest_names_hit}});
-    return '' if !$total_hits;
+    return (0,0,@result) if !$total_hits;
 
     my %subtest_names_hit;
     $subtest_names_hit{$_}++ foreach @{$self->{subtest_names_hit}};
@@ -823,7 +824,6 @@ sub get_array_names_of_subtests_hit {
     my @subtests = sort keys %subtest_names_hit;
     my $deduplicated_hits = scalar(@subtests);
 
-    my @result;
     foreach my $rule (@subtests) {
       if ($subtest_names_hit{$rule} > 1) {
         push @result, "$rule($subtest_names_hit{$rule})";

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=1870343&r1=1870342&r2=1870343&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Sun Nov 24 19:41:30 2019
@@ -826,11 +826,12 @@ underscores, used in meta rules.
 
 sub get_array_names_of_subtests_hit {
   my ($self, $mode) = @_;
+  my @result;
 
   if (defined $mode && $mode eq 'dbg') {
     # This routine prints only one instance of a subrule hit with a count of how many times it hit if greater than 1
     my $total_hits = scalar(@{$self->{subtest_names_hit}});
-    return '' if !$total_hits;
+    return (0,0,@result) if !$total_hits;
 
     my %subtest_names_hit;
     $subtest_names_hit{$_}++ foreach @{$self->{subtest_names_hit}};
@@ -838,7 +839,6 @@ sub get_array_names_of_subtests_hit {
     my @subtests = sort keys %subtest_names_hit;
     my $deduplicated_hits = scalar(@subtests);
 
-    my @result;
     foreach my $rule (@subtests) {
       if ($subtest_names_hit{$rule} > 1) {
         push @result, "$rule($subtest_names_hit{$rule})";