Avoid "Duplicate entry"
This commit is contained in:
parent
f7be0abafa
commit
c1e8dbdbae
|
@ -22,6 +22,7 @@
|
||||||
namespace Friendica\Util;
|
namespace Friendica\Util;
|
||||||
|
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
|
use Friendica\Database\Database;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\APContact;
|
use Friendica\Model\APContact;
|
||||||
|
@ -323,7 +324,7 @@ class HTTPSignature
|
||||||
|
|
||||||
$status = DBA::selectFirst('inbox-status', [], ['url' => $url]);
|
$status = DBA::selectFirst('inbox-status', [], ['url' => $url]);
|
||||||
if (!DBA::isResult($status)) {
|
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]);
|
$status = DBA::selectFirst('inbox-status', [], ['url' => $url]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user