mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: do not flag the TLDs as deleted inside the foreach loop
This commit is contained in:
@@ -18,7 +18,8 @@ final readonly class UpdateRdapServersHandler
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private OfficialDataService $officialDataService,
|
private OfficialDataService $officialDataService,
|
||||||
private ParameterBagInterface $bag, private DomainRepository $domainRepository,
|
private ParameterBagInterface $bag,
|
||||||
|
private DomainRepository $domainRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,13 +159,13 @@ class OfficialDataService
|
|||||||
));
|
));
|
||||||
array_shift($tldList);
|
array_shift($tldList);
|
||||||
|
|
||||||
|
$this->tldRepository->setAllTldAsDeleted();
|
||||||
|
|
||||||
foreach ($tldList as $tld) {
|
foreach ($tldList as $tld) {
|
||||||
if ('' === $tld) {
|
if ('' === $tld) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tldRepository->setAllTldAsDeleted();
|
|
||||||
|
|
||||||
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
||||||
|
|
||||||
if (null === $tldEntity) {
|
if (null === $tldEntity) {
|
||||||
|
|||||||
Reference in New Issue
Block a user