From 0b7ddf73b5d9a0669b8c5b33ef492b0f0d8b929b Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Mon, 23 Jul 2018 20:44:24 +0100 Subject: [PATCH] Drop unnecessary call to getContactMembership --- CRM/Contribute/BAO/Contribution.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index afd33a8ed6aa..987d2f2e7a80 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -5465,18 +5465,14 @@ protected static function updateMembershipBasedOnCompletionOfContribution($contr ); // Does the contact have a "current" membership (ie. not expired/pending etc). - $currentMembership = CRM_Member_BAO_Membership::getContactMembership($membershipParams['contact_id'], - $membershipParams['membership_type_id'], - $membershipParams['is_test'], - $membershipParams['id'] - ); - if ($currentMembership) { + if (!empty($membership['status_id.is_current_member'])) { /* * Fixed FOR CRM-4433 * In BAO/Membership.php(renewMembership function), we skip the extend membership date and status * when Contribution mode is notify and membership is for renewal ) + * FIXME: Is this still required? */ - CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew($currentMembership, $changeDate); + CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew($membership, $changeDate); } // Tell the Membership BAO to calculate membership status.