Skip to content

Commit

Permalink
fix: duplicate key value violates unique constraint error
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Sep 9, 2024
1 parent 0e98b7d commit b1d0725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/RDAPService.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function registerDomain(string $fqdn): Domain
'ldhName' => strtolower($rdapNameserver['ldhName']),
]);

$domainNS = $domain->getNameservers()->findFirst(fn (Nameserver $ns) => $ns->getLdhName() === $rdapNameserver['ldhName']);
$domainNS = $domain->getNameservers()->findFirst(fn (int $key, Nameserver $ns) => $ns->getLdhName() === $rdapNameserver['ldhName']);

if (null !== $domainNS) {
$nameserver = $domainNS;
Expand Down

0 comments on commit b1d0725

Please sign in to comment.