diff --git a/modules/search/search.module b/modules/search/search.module
index bc7db2855e9acad12ac901c9afc47a6fe6ce26a6..0d945ff32ce32d72fdf0b458f83655d6520d952a 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -287,7 +287,7 @@ function search_update_totals() {
     $total = log10(1 + 1/(max(1, $total)));
     db_query("UPDATE {search_total} SET count = %f WHERE word = '%s'", $total, $word);
     if (!db_affected_rows()) {
-      db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %f)", $word, $total);
+      @db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %f)", $word, $total);
     }
   }
   // Find words that were deleted from search_index, but are still in
diff --git a/modules/user/user.module b/modules/user/user.module
index 3faa5a57563d7b9fbde4ec835e277ba4b7de9397..3b572a3af9024904166573f39286171666b160f2 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1250,7 +1250,7 @@ function user_set_authmaps($account, $authmaps) {
     if ($value) {
       db_query("UPDATE {authmap} SET authname = '%s' WHERE uid = %d AND module = '%s'", $value, $account->uid, $module[1]);
       if (!db_affected_rows()) {
-        db_query("INSERT INTO {authmap} (authname, uid, module) VALUES ('%s', %d, '%s')", $value, $account->uid, $module[1]);
+        @db_query("INSERT INTO {authmap} (authname, uid, module) VALUES ('%s', %d, '%s')", $value, $account->uid, $module[1]);
       }
     }
     else {