Remove error handling for core error being returned
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 9 Sep 2021 22:23:05 +0000 (10:23 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 9 Sep 2021 22:23:05 +0000 (10:23 +1200)
This would be throwing an exception - also it isn't an error situation

Civi/Token/TokenCompatSubscriber.php

index 3ebc0a09f9e1b26c19fedfc75598a7694f86fb3a..bdbd0ab9f85b005d4e2d0d2416a5a17f2ad60239 100644 (file)
@@ -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'])) {