mirror of
https://github.com/friendica/friendica
synced 2024-11-20 07:03:41 +00:00
Merge pull request #9671 from annando/insert-ignore
Avoid "Duplicate entry"
This commit is contained in:
commit
b72f6d05cd
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\APContact;
|
||||
|
@ -323,7 +324,7 @@ class HTTPSignature
|
|||
|
||||
$status = DBA::selectFirst('inbox-status', [], ['url' => $url]);
|
||||
if (!DBA::isResult($status)) {
|
||||
DBA::insert('inbox-status', ['url' => $url, 'created' => $now, 'shared' => $shared]);
|
||||
DBA::insert('inbox-status', ['url' => $url, 'created' => $now, 'shared' => $shared], Database::INSERT_IGNORE);
|
||||
$status = DBA::selectFirst('inbox-status', [], ['url' => $url]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue