From 7c4ac790696cccc0f38ae889d03f9a30e2ac1562 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 11 Jan 2022 14:15:09 +1300 Subject: [PATCH] Stop calling confusing function that doesn't do much ..... --- CRM/Contact/BAO/Contact/Utils.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index 0248dfe2f7..77b9437864 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -338,7 +338,11 @@ WHERE id IN ( $idString ) // step 3: if valid relationship then add the relation and keep the count // step 1 - $contactFields = CRM_Contact_BAO_Relationship::setContactABFromIDs($params, $ids, $organizationID); + $contactFields = [ + 'contact_id_a' => $contactID, + 'contact_id_b' => $organizationID, + 'relationship_type_id' => $relationshipTypeID, + ]; if (!CRM_Contact_BAO_Relationship::checkRelationshipType($contactFields['contact_id_a'], $contactFields['contact_id_b'], $contactFields['relationship_type_id'])) { return [0, []]; @@ -347,7 +351,7 @@ WHERE id IN ( $idString ) if ( CRM_Contact_BAO_Relationship::checkDuplicateRelationship( $contactFields, - CRM_Utils_Array::value('contact', $ids), + $contactID, // step 2 $organizationID ) -- 2.25.1