diff --git a/src/Database/Database.php b/src/Database/Database.php index 787ae54c7..80fd02dc0 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1421,7 +1421,7 @@ class Database if (is_bool($old_fields)) { if ($do_insert) { $values = array_merge($condition, $fields); - return $this->insert($table, $values, $do_insert); + return $this->replace($table, $values); } $old_fields = []; } diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 9fc72ac5a..634ce441a 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -349,7 +349,7 @@ class APContact if (!DBA::exists('inbox-status', ['url' => $url])) { $fields = array_merge($fields, ['url' => $url, 'created' => $now]); - DBA::insert('inbox-status', $fields); + DBA::replace('inbox-status', $fields); } else { DBA::update('inbox-status', $fields, ['url' => $url]); }