diff --git a/ext/comment/main.php b/ext/comment/main.php index 0c54ad06..6f082a76 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -408,9 +408,13 @@ class CommentList extends SimpleExtension { # 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'] = ''; + $comment['referrer'] = 'none'; log_warning("comment", "User '{$user->name}' commented with no referrer: $text"); } + if(!isset($_SERVER['HTTP_USER_AGENT'])) { + $comment['user_agent'] = 'none'; + log_warning("comment", "User '{$user->name}' commented with no user-agent: $text"); + } $akismet = new Akismet( $_SERVER['SERVER_NAME'],