fix: id field may be empty in RDAP response

This commit is contained in:
Maël Gangloff
2024-12-27 22:29:35 +01:00
parent 0e0a8be0bc
commit c3c7de1902

View File

@@ -476,7 +476,7 @@ readonly class RDAPService
$isIANAid = false;
if (array_key_exists('publicIds', $rdapEntity)) {
foreach ($rdapEntity['publicIds'] as $publicId) {
if ('IANA Registrar ID' === $publicId['type'] && array_key_exists('identifier', $publicId)) {
if ('IANA Registrar ID' === $publicId['type'] && array_key_exists('identifier', $publicId) && '' !== $publicId['identifier']) {
$rdapEntity['handle'] = $publicId['identifier'];
$isIANAid = true;
break;