Hello,
I found the bug !
functions.php, postComment(...), line 992:
`$commentobj->setInModeration(2); //mark as not posted`
As the return code of the SpamFilter is 0, This variable is not modified anymore in this file. So, we are getting back to functions-controller.php
with the value "2".
functions-controller.php, zp_handle_comment(...), line 184:
`
$comment_error = $commentadded->getInModeration();
[... the value is 0, so it does not get in the if statement ...]
$comment_error++;
`
So, right now, the $comment_error value is 3.
controller.php:
`$_zp_comment_error = zp_handle_comment();`
$_zp_comment_error is used to determine the error message to send to the spammer.
We have two ways to solve that bug:
- in comment_form.php, getCommentErrors:
`case 3: return gettext("Your comment failed the SPAM filter check.");`
- modify functions.php, functions-controller to handle the case where a spam filter will return a 0 (the comment has to be dropped)
Try and guess what I did
Do you want me to fill a bug with this fix?