diff --git a/security_review.module b/security_review.module
index ef7a98d..b6c779d 100644
--- a/security_review.module
+++ b/security_review.module
@@ -590,22 +590,25 @@ function security_review_security_checks() {
     'failure' => t('Private files is enabled but the specified directory is not secure outside the web server root.'),
     'file' => 'security_review.checks',
   );
-  $checks['query_errors'] = array(
-    'title' => t('Database errors'),
-    'type' => 'callback',
-    'callback' => 'security_review_check_query_errors',
-    'success' => t('Few query errors from the same IP.'),
-    'failure' => t('Query errors from the same IP. These may be a SQL injection attack or an attempt at information disclosure.'),
-    'file' => 'security_review.checks',
-  );
-  $checks['failed_logins'] = array(
-    'title' => t('Failed logins'),
-    'type' => 'callback',
-    'callback' => 'security_review_check_failed_logins',
-    'success' => t('Few failed login attempts from the same IP.'),
-    'failure' => t('Failed login attempts from the same IP. These may be a brute-force attack to gain access to your site.'),
-    'file' => 'security_review.checks',
-  );
+  if (db_table_exists('watchdog')) {
+    $checks['query_errors'] = array(
+      'title' => t('Database errors'),
+      'type' => 'callback',
+      'callback' => 'security_review_check_query_errors',
+      'success' => t('Few query errors from the same IP.'),
+      'failure' => t('Query errors from the same IP. These may be a SQL injection attack or an attempt at information disclosure.'),
+      'file' => 'security_review.checks',
+    );
+
+    $checks['failed_logins'] = array(
+      'title' => t('Failed logins'),
+      'type' => 'callback',
+      'callback' => 'security_review_check_failed_logins',
+      'success' => t('Few failed login attempts from the same IP.'),
+      'failure' => t('Failed login attempts from the same IP. These may be a brute-force attack to gain access to your site.'),
+      'file' => 'security_review.checks',
+    );
+  }
   $checks['admin_permissions'] = array(
     'title' => t('Drupal admin permissions'),
     'type' => 'callback',
