lib/askismet expects the referrer to either be set manually, or exist; if it doesn't exist we need to set it manually
This commit is contained in:
parent
a75d8744c9
commit
7608107232
@ -405,6 +405,13 @@ class CommentList extends SimpleExtension {
|
||||
'permalink' => '',
|
||||
);
|
||||
|
||||
# akismet breaks if there's no referrer in the environment; so if there
|
||||
# isn't, supply one manually
|
||||
if(!isset($_SERVER['HTTP_REFERER'])) {
|
||||
$comment['referrer'] = '';
|
||||
log_warning("comment", "User '{$user->name}' commented with no referrer: $text");
|
||||
}
|
||||
|
||||
$akismet = new Akismet(
|
||||
$_SERVER['SERVER_NAME'],
|
||||
$config->get_string('comment_wordpress_key'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user