diff --git a/www/cms/sites/all/modules/antispam/antispam.module b/www/cms/sites/all/modules/antispam/antispam.module
index 4221226..a16a297 100644
--- a/www/cms/sites/all/modules/antispam/antispam.module
+++ b/www/cms/sites/all/modules/antispam/antispam.module
@@ -992,23 +992,23 @@ function antispam_comment_presave($comment) {
   $antispambot_rules = antispam_get_anti_spambot_rules();
   $query = db_select('antispam_spam_marks', 's');
   $query->fields('s', array('content_id'));
-  if ($antispambot_rules['body']) {
+  if (!empty($antispambot_rules) && $antispambot_rules['body']) {
     $query->join('comment', 'c', 's.content_id = c.cid');
   }
   $query->condition('s.content_type', 'comment');
   $query->range(0, 1);
 
-  if ($antispambot_rules['ip']) {
+  if (!empty($antispambot_rules) && $antispambot_rules['ip']) {
     $query->condition('s.hostname', ip_address());
     $debug_info['IP-address'] = ip_address();
     $num_condition++;
   }
-  if ($antispambot_rules['mail'] && !empty($comment->mail)) {
+  if (!empty($antispambot_rules) && $antispambot_rules['mail'] && !empty($comment->mail)) {
     $query->condition('s.mail', $comment->mail);
     $debug_info['E-mail'] = $comment->mail;
     $num_condition++;
   }
-  if ($antispambot_rules['body'] && !empty($comment->comment_body)) {
+  if (!empty($antispambot_rules) && $antispambot_rules['body'] && !empty($comment->comment_body)) {
     $query->condition('c.comment', render($comment->comment_body[$comment->language][0]['value']));
     $debug_info['Content'] = $comment->mail[$comment->language][0]['value'];
     $num_condition++;
