fix: entity handle can be an empty string

This commit is contained in:
Maël Gangloff
2024-07-21 02:25:37 +02:00
parent 17a1cc2938
commit 63f8dc168d
5 changed files with 24 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ readonly class RDAPService
}
foreach ($res['entities'] as $rdapEntity) {
if (!array_key_exists('handle', $rdapEntity)) continue;
if (!array_key_exists('handle', $rdapEntity) || $rdapEntity['handle'] === '') continue;
$entity = $this->registerEntity($rdapEntity);
$this->em->persist($entity);
@@ -151,7 +151,7 @@ readonly class RDAPService
}
foreach ($rdapNameserver['entities'] as $rdapEntity) {
if (!array_key_exists('handle', $rdapEntity)) continue;
if (!array_key_exists('handle', $rdapEntity) || $rdapEntity['handle'] === '') continue;
$entity = $this->registerEntity($rdapEntity);
$this->em->persist($entity);