Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Commit

Permalink
don't throw errors if the contact id is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Pedretti committed Jan 24, 2018
1 parent deaafdc commit 2c980bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Resources/BareResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public function __construct($entry, $translateTimestamps = true)

case 'contact_type_id':
$contactTypes = CRM::fieldList('contactType');
$this->contact_type = $contactTypes[$entry['contact_type_id']];
if (!empty($entry['contact_type_id']))
$this->contact_type = $contactTypes[$entry['contact_type_id']];
break;

default:
Expand Down

0 comments on commit 2c980bc

Please sign in to comment.