diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 329ed5e42127..5f63159d4f50 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -3543,7 +3543,7 @@ private static function getTemplateForGreeting(string $greetingType, CRM_Contact 'contact_type' => $contact->contact_type, 'greeting_type' => $greetingType, ]; - return CRM_Core_PseudoConstant::greeting($filter)[$contact->{$idField}]; + return CRM_Core_PseudoConstant::greeting($filter)[$contact->{$idField}] ?? ''; } /**