From f201289d7f037b9eb09c2ed19a65a4b768a6fc19 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 8 Aug 2013 10:15:24 +1200 Subject: [PATCH] e-notice fix --- CRM/Contact/BAO/Relationship.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 9077f8f9b4..f644e36f71 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1549,6 +1549,9 @@ cc.sort_name LIKE '%$name%'"; static function membershipTypeToRelationshipTypes(&$params, $direction = NULL) { $membershipType = civicrm_api3('membership_type', 'getsingle', array('id' => $params['membership_type_id'], 'return' => 'relationship_type_id, relationship_direction')); $relationshipTypes = $membershipType['relationship_type_id']; + if(empty($relationshipTypes)) { + return; + } // if we don't have any contact data we can only filter on type if(empty($params['contact_id']) && empty($params['contact_id_a']) && empty($params['contact_id_a'])) { $params['relationship_type_id'] = array('IN' => $relationshipTypes); -- 2.25.1