Prevent contact id = 0 case in VCard

This commit is contained in:
Hypolite Petovan 2025-01-01 16:17:31 -05:00
parent d2dce46184
commit e3aa9b8121

View file

@ -69,7 +69,7 @@ class VCard
} else {
$pcontact = Contact::selectFirst([], ['uid' => DI::userSession()->getLocalUserId(), 'uri-id' => $contact['uri-id'], 'deleted' => false]);
$id = $pcontact['id'] ?? 0;
$id = $pcontact['id'] ?? $contact['id'];
$rel = $pcontact['rel'] ?? Contact::NOTHING;
$pending = $pcontact['pending'] ?? false;