Division by zero errors
willdashwood - July 18, 2008 - 15:50
| Project: | Spam |
| Version: | 5.x-3.x-dev |
| Component: | Bayesian Filter |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Jeremy@kerneltrap.org |
| Status: | closed |
Jump to:
Description
Sorry if this has already been spotted but I tried the latest dev copy and the bug is still in there.
When creating a new account, if the user submits the form without completing mandatory fields, such as user name, the following errors are produced.
warning: Invalid argument supplied for foreach() in ...bayesian.module on line 62.
warning: asort() expects parameter 1 to be array, null given in ...bayesian.module on line 73.
warning: array_keys() [function.array-keys]: The first argument should be an array in ...bayesian.module on line 78.
warning: array_pop() [function.array-pop]: The argument should be an array in ...bayesian.module on line 82.
warning: Division by zero in ...bayesian.module on line 97. As a temporary measure I've unchecked "Bayesian filter" in admin/settings/spam/filters. Interestingly I already had "Users" unchecked under "Content to filter" on admin/settings/spam.
Thanks :)

#1
Fix committed to the development branch.
#2
Automatically closed -- issue fixed for two weeks with no activity.