Do not generate a notice when a vcard is downloaded
authorKlaas Eikelboom <klaas.eikelboom@civicoop.org>
Mon, 2 Aug 2021 13:18:56 +0000 (15:18 +0200)
committerKlaas Eikelboom <klaas.eikelboom@civicoop.org>
Mon, 2 Aug 2021 13:18:56 +0000 (15:18 +0200)
CRM/Contact/Page/View/Vcard.php

index eb514ca0498645f018c8d8ca8e96c8995dbf5e58..9d98552cf35c053ac6d1dd35210fbd615588cb99 100644 (file)
@@ -127,7 +127,7 @@ class CRM_Contact_Page_View_Vcard extends CRM_Contact_Page_View {
         if ($vcardName) {
           $vcard->addParam('TYPE', $vcardName);
         }
-        if ($phone['is_primary']) {
+        if (!empty($phone['is_primary'])) {
           $vcard->addParam('TYPE', 'PREF');
         }
       }
@@ -140,7 +140,7 @@ class CRM_Contact_Page_View_Vcard extends CRM_Contact_Page_View {
         if ($vcardName) {
           $vcard->addParam('TYPE', $vcardName);
         }
-        if ($email['is_primary']) {
+        if (!empty($email['is_primary'])) {
           $vcard->addParam('TYPE', 'PREF');
         }
       }