fix: do not flag the TLDs as deleted inside the foreach loop

This commit is contained in:
Maël Gangloff
2025-12-19 00:53:22 +01:00
parent 545677ddf7
commit 76377116ce
2 changed files with 4 additions and 3 deletions

View File

@@ -18,7 +18,8 @@ final readonly class UpdateRdapServersHandler
{
public function __construct(
private OfficialDataService $officialDataService,
private ParameterBagInterface $bag, private DomainRepository $domainRepository,
private ParameterBagInterface $bag,
private DomainRepository $domainRepository,
) {
}

View File

@@ -159,13 +159,13 @@ class OfficialDataService
));
array_shift($tldList);
$this->tldRepository->setAllTldAsDeleted();
foreach ($tldList as $tld) {
if ('' === $tld) {
continue;
}
$this->tldRepository->setAllTldAsDeleted();
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
if (null === $tldEntity) {