Merge branch 'master' into feat/rss-feed

This commit is contained in:
Maël Gangloff 2025-08-11 00:40:20 +02:00
commit f690b6aa01
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -545,11 +545,30 @@ readonly class RDAPService
if (isset($rdapEntity['vcardArray']) && !in_array($rdapEntity['handle'], self::IANA_RESERVED_IDS)) { if (isset($rdapEntity['vcardArray']) && !in_array($rdapEntity['handle'], self::IANA_RESERVED_IDS)) {
if (empty($entity->getJCard())) { if (empty($entity->getJCard())) {
$entity->setJCard($rdapEntity['vcardArray']); if (!array_key_exists('elements', $rdapEntity['vcardArray'])) {
$entity->setJCard($rdapEntity['vcardArray']);
} else {
/*
* UZ registry
*/
$entity->setJCard([
'vcard',
$rdapEntity['vcardArray']['elements'],
]);
}
} else { } else {
$properties = []; $properties = [];
foreach ($rdapEntity['vcardArray'][1] as $prop) { if (!array_key_exists('elements', $rdapEntity['vcardArray'])) {
$properties[$prop[0]] = $prop; foreach ($rdapEntity['vcardArray'][1] as $prop) {
$properties[$prop[0]] = $prop;
}
} else {
/*
* UZ registry
*/
foreach ($rdapEntity['vcardArray']['elements'] as $prop) {
$properties[$prop[0]] = $prop;
}
} }
foreach ($entity->getJCard()[1] as $prop) { foreach ($entity->getJCard()[1] as $prop) {
$properties[$prop[0]] = $prop; $properties[$prop[0]] = $prop;