From 4091c7e74d4cb3f26ba16a747ce266a39d80f21f Mon Sep 17 00:00:00 2001 From: francescbassas Date: Tue, 18 Oct 2016 21:16:22 +0200 Subject: [PATCH] CRM-19313 - Can't assign custom group to relationships with two contact subtypes involved --- CRM/Contact/BAO/Relationship.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 0af25f39fe..07d719a3d5 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -509,7 +509,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { * @param string $column * Name/label that going to retrieve from db. * @param bool $biDirectional - * @param string $contactSubType + * @param array $contactSubType * Includes relationship types between this subtype. * @param bool $onlySubTypeRelationTypes * If set only subtype which is passed by $contactSubType @@ -551,7 +551,9 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { } } - $contactSubType = array(); + if (empty($contactSubType)) { + $contactSubType = array(); + } if ($contactId) { $contactType = CRM_Contact_BAO_Contact::getContactType($contactId); $contactSubType = CRM_Contact_BAO_Contact::getContactSubType($contactId); -- 2.25.1