Skip to content

Commit

Permalink
Merge pull request civicrm#16136 from eileenmcnaughton/member_test
Browse files Browse the repository at this point in the history
[REF] remove CRM_Core_Error check
  • Loading branch information
seamuslee001 authored Dec 23, 2019
2 parents d1dd266 + e072b01 commit d129a1b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions CRM/Member/BAO/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1362,14 +1362,11 @@ public static function createRelatedMemberships(&$params, &$dao, $reset = FALSE)
$expiredStatusId = array_search('Expired', CRM_Member_PseudoConstant::membershipStatus());
}

$allRelatedContacts = [];
$relatedContacts = [];
if (!is_a($membership, 'CRM_Core_Error')) {
$allRelatedContacts = CRM_Member_BAO_Membership::checkMembershipRelationship($membership->membership_type_id,
$membership->contact_id,
CRM_Utils_Array::value('action', $params)
);
}
$allRelatedContacts = CRM_Member_BAO_Membership::checkMembershipRelationship($membership->membership_type_id,
$membership->contact_id,
CRM_Utils_Array::value('action', $params)
);

// CRM-4213, CRM-19735 check for loops, using static variable to record contacts already processed.
// Remove repeated related contacts, which already inherited membership of this type.
Expand Down

0 comments on commit d129a1b

Please sign in to comment.