You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/11/21 23:06:59 UTC
svn commit: r106126 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm
Author: felicity
Date: Sun Nov 21 14:06:57 2004
New Revision: 106126
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm
Log:
bug 3987: razor results were sometimes undef even though they should have set to 0 in that case. try making the 0 setting more explicit, and also deal with the possibility that the engine value is undef.
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm
Url: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm?view=diff&rev=106126&p1=spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm&r1=106125&p2=spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm&r2=106126
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Razor2.pm Sun Nov 21 14:06:57 2004
@@ -239,9 +239,14 @@
if ( exists $cf->{resp} ) {
for (my $response=0;$response<@{$cf->{resp}};$response++) {
my $tmp = $cf->{resp}->[$response];
- my $tmpcf = $tmp->{cf} || 0; # Part confidence
- my $tmpct = $tmp->{ct} || 0; # Part contested?
+ my $tmpcf = $tmp->{cf}; # Part confidence
+ my $tmpct = $tmp->{ct}; # Part contested?
my $engine = $cf->{sent}->[$response]->{e};
+
+ # These should always be set, but just in case ...
+ $tmpcf = 0 unless defined $tmpcf;
+ $tmpct = 0 unless defined $tmpcf;
+ $engine = 0 unless defined $engine;
push(@results,
{ part => $part, engine => $engine, contested => $tmpct, confidence => $tmpcf });