|
SA Bugzilla – Full Text Bug Listing |
Summary: | calculate_expire_delta return value in BayesStore SQL.pm causes Perl warning | ||
---|---|---|---|
Product: | Spamassassin | Reporter: | Peter Fritz <peter> |
Component: | spamassassin | Assignee: | SpamAssassin Developer Mailing List <dev> |
Status: | NEW --- | ||
Severity: | trivial | ||
Priority: | P5 | ||
Version: | SVN Trunk (Latest Devel Version) | ||
Target Milestone: | Undefined | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
Attachments: | Change return value of BayesStore/SQL.pm::calculate_expire_delta to empty hash |
Description
Peter Fritz
2007-07-04 07:14:17 UTC
Created attachment 4031 [details]
Change return value of BayesStore/SQL.pm::calculate_expire_delta to empty hash
If possible, could this trivial patch be reviewed for 3.2.4? In the mean time I have been manually patching local installations and the patch resolves the warning. See also #5661 related to SQL.pm. Cheers. (In reply to comment #0) > The calculate_expire_delta function in BayesStore/SQL.pm can return undef, > which creates a warning (turns up in procmail logs): > warn: Odd number of elements in hash assignment at BayesStore.pm line 322. > warn: Use of uninitialized value in list assignment at BayesStore.pm line 322. > > It should probably return an empty hash at that point (as per the patch), since > %delta may have information in it by that stage which we don't want to return, > since the function didn't complete. > > Also need to make sure that the expected behaviour of "return 0 unless > (%delta);" is maintained in BayesStore.pm, after this call is made: > my %delta = $self->calculate_expire_delta($vars[10], $start, $max_expire_mult); > |