From e3aa9b812111861c7e4dd6953f6c0e13538292f0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 1 Jan 2025 16:17:31 -0500 Subject: [PATCH] Prevent contact id = 0 case in VCard --- src/Content/Widget/VCard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Widget/VCard.php b/src/Content/Widget/VCard.php index cda7bb53b8..7feac4403c 100644 --- a/src/Content/Widget/VCard.php +++ b/src/Content/Widget/VCard.php @@ -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;