Skip to content

Commit

Permalink
CRM-21849: Change to loose comparison
Browse files Browse the repository at this point in the history
Based on the docblock I expected contact ID to be an int, but this is
not always the case.
  • Loading branch information
mickadoo committed Apr 16, 2018
1 parent 44d259b commit b277f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ public static function getContactRelationshipType(
$relationship->id = $relationshipId;
if ($relationship->find(TRUE)) {
$contact = new CRM_Contact_DAO_Contact();
$contact->id = ((int) $relationship->contact_id_a === $contactId) ? $relationship->contact_id_b : $relationship->contact_id_a;
$contact->id = ($relationship->contact_id_a == $contactId) ? $relationship->contact_id_b : $relationship->contact_id_a;

if ($contact->find(TRUE)) {
$otherContactType = $contact->contact_type;
Expand Down

0 comments on commit b277f8d

Please sign in to comment.