http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5729
Summary: $dbh->do may return 0E0 instead of number
Product: Spamassassin
Version: 3.2.1
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Inside BayesStore/PgSQL in the method token_expiration a $dbh->do is issued and
the number of affected rows is stored inside $deleted (lines 133-142). Later on
the number of deleted rows is used to update bayes_vars. However, $dbh->do does
*not* return 0 if no row was affected but "0E0" instead (if no error occured).
If that happens the following UPDATE query will fail because "0E0" is not a
number.
Proposed patch:
Change
$deleted = $rows;
to
$deleted = ($rows eq "0E0") ? 0 : $rows;
(line 142).
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.