> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gary
> Funck
> Sent: Wednesday, December 10, 2003 8:49 AM
> To: Spamassassin List
> Subject: [SAtalk] non-numeric atime in Bayes db? (SA 2.61)
>
>
>
> Hello,
>
> after running a spam refiling script which invokes 'spamassassin -r', I
> received the
> following diagnostics:
>
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm line 362.
> Argument "" isn't numeric in numeric lt (<) at
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/BayesStore.pm line 1248.
> Argument "" isn't numeric in numeric lt (<) at
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/BayesStore.pm line 1248.
> [repeated 20 or more times]
>
> Here's the offeding line:
>
>    1247     my $oldmagic =
> $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN}
> ;
>    1248     if (!defined ($oldmagic) || $atime < $oldmagic) {
>    1249       $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN} = $atime;
>    1250     }
>

Follow-up, adding a check to see if $oldmagic is "" made the complaints
go away:

   1248     my $oldmagic =
$self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN};
   1249     $oldmagic = 0 if (defined($oldmagic) && $oldmagic eq "");
   1250     if (!defined ($oldmagic) || $atime < $oldmagic) {
   1251       $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN} = $atime;
   1252     }

this can be recoded more succinctly, I'm sure.




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to