From 51d0ad3d78110a2b33ae1f56ddf96c4ce43e793b Mon Sep 17 00:00:00 2001 From: monishdeb Date: Wed, 4 Nov 2015 13:37:59 +0530 Subject: [PATCH] CRM-17497 fix - Adding relationship with multi-valued custom field fails https://issues.civicrm.org/jira/browse/CRM-17497 --- CRM/Contact/BAO/Relationship.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index f2946a6079..adb8dc0a60 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1474,11 +1474,10 @@ LEFT JOIN civicrm_country ON (civicrm_address.country_id = civicrm_country.id) $query = 'SELECT * FROM `civicrm_membership_status`'; if ($active) { - $query .= 'WHERE `is_current_member` = 1 OR `id` = %1 '; + $query .= ' WHERE `is_current_member` = 1 OR `id` = %1 '; } - $params[1] = array($pendingStatusId, 'String'); - $dao = CRM_Core_DAO::executeQuery($query, $params); + $dao = CRM_Core_DAO::executeQuery($query, array(1 => array($pendingStatusId, 'Integer'))); while ($dao->fetch()) { $membershipStatusRecordIds[$dao->id] = $dao->id; -- 2.25.1