From b1d0725275eebb9d3c6407317e526b6cc715c724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Mon, 9 Sep 2024 11:55:11 +0200 Subject: [PATCH] fix: duplicate key value violates unique constraint error --- src/Service/RDAPService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index 6c353ec..2805b27 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -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;