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,12 +545,31 @@ readonly class RDAPService
if (isset($rdapEntity['vcardArray']) && !in_array($rdapEntity['handle'], self::IANA_RESERVED_IDS)) {
if (empty($entity->getJCard())) {
if (!array_key_exists('elements', $rdapEntity['vcardArray'])) {
$entity->setJCard($rdapEntity['vcardArray']);
} else {
/*
* UZ registry
*/
$entity->setJCard([
'vcard',
$rdapEntity['vcardArray']['elements'],
]);
}
} else {
$properties = [];
if (!array_key_exists('elements', $rdapEntity['vcardArray'])) {
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) {
$properties[$prop[0]] = $prop;
}