From 25db5eebd476ae4e9708cdfc9c9c201999dee7bc Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 10 Sep 2021 10:23:05 +1200 Subject: [PATCH] Remove error handling for core error being returned This would be throwing an exception - also it isn't an error situation --- Civi/Token/TokenCompatSubscriber.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Civi/Token/TokenCompatSubscriber.php b/Civi/Token/TokenCompatSubscriber.php index 3ebc0a09f9..bdbd0ab9f8 100644 --- a/Civi/Token/TokenCompatSubscriber.php +++ b/Civi/Token/TokenCompatSubscriber.php @@ -94,11 +94,6 @@ class TokenCompatSubscriber implements EventSubscriberInterface { $contact['email_greeting'] = $contact['email_greeting_display'] ?? ''; $contact['postal_greeting'] = $contact['postal_greeting_display'] ?? ''; $contact['addressee'] = $contact['address_display'] ?? ''; - if (!$contact || is_a($contact, 'CRM_Core_Error')) { - // FIXME: Need to differentiate errors which kill the batch vs the individual row. - \Civi::log()->debug('Failed to generate token data. Invalid contact ID: ' . $row->context['contactId']); - continue; - } //update value of custom field token if (!empty($messageTokens['contact'])) { -- 2.25.1