Bug in spamblock logging?
Posted: Wed Sep 24, 2008 5:59 am
I use the spamblock plugin with akismet, and I log to a file. I think I found a bug in the text put into the log file.
From serendipity_event_spamblock.php line 508:
I think the strings for AKISMET_PASS and AKISMET_SPAM are reversed. We write "Akismet API returned spam" in the case where we set $ret['is_spam'] = false. Note that the only problem here is in the logfile. Comments are correctly rejected/moderated or accepted based on the akismet reply, but my logfile looks very confusing.
From serendipity_event_spamblock.php line 508:
Code: Select all
if (preg_match('@true@i', $reqdata)) {
$ret['is_spam'] = true;
$ret['message'] = $reqdata;
$this->log($this->logfile, $eventData['id'], 'AKISMET_PASS', 'Passed Akismet verification', $addData);
} elseif (preg_match('@false@i', $reqdata)) {
$ret['is_spam'] = false;
$ret['message'] = $reqdata;
$this->log($this->logfile, $eventData['id'], 'AKISMET_SPAM', 'Akismet API returned spam', $addData);