Skip to content

Commit

Permalink
Fix for #1: don't throw exception if queued order/attendee is for an …
Browse files Browse the repository at this point in the history
…un-configured event.
  • Loading branch information
twomice committed Jun 5, 2019
1 parent aea517f commit cc30b30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CRM/Eventbrite/WebhookProcessor/Attendee.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ public function process() {
), "Processing Attendee {$this->entityId}, attempting to get Event ID.");
if (!$this->eventId) {
CRM_Eventbrite_BAO_EventbriteLog::create(array(
'message' => "Could not find EventbriteLink record 'Event' for attendee {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->attendee) . "; cannot process Attendee. In method " . __METHOD__ . ", file " . __FILE__ . ", line " . __LINE__,
'message' => "Could not find EventbriteLink record 'Event' for attendee {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->attendee) . "; skipping Attendee. In method " . __METHOD__ . ", file " . __FILE__ . ", line " . __LINE__,
'message_type_id' => CRM_Eventbrite_BAO_EventbriteLog::MESSAGE_TYPE_ID_GENERAL,
));
throw new CRM_Exception("Could not find EventbriteLink 'Event' record for attendee {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->attendee) . "; cannot process Attendee.");
return;
}

Expand Down
3 changes: 1 addition & 2 deletions CRM/Eventbrite/WebhookProcessor/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ public function process() {
), "Processing Order {$this->entityId}, attempting to get linked event for order.");
if (!$this->eventId) {
CRM_Eventbrite_BAO_EventbriteLog::create(array(
'message' => "Could not find EventbriteLink record 'Event' for order {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->order) . "; cannot process Order. In method " . __METHOD__ . ", file " . __FILE__ . ", line " . __LINE__,
'message' => "Could not find EventbriteLink record 'Event' for order {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->order) . "; skipping Order. In method " . __METHOD__ . ", file " . __FILE__ . ", line " . __LINE__,
'message_type_id' => CRM_Eventbrite_BAO_EventbriteLog::MESSAGE_TYPE_ID_GENERAL,
));
throw new CRM_Exception("Could not find EventbriteLink 'Event' record for order {$this->entityId} with 'event_id': " . CRM_Utils_Array::value('event_id', $this->order) . "; cannot process Order.");
return;
}

Expand Down

0 comments on commit cc30b30

Please sign in to comment.