From af9ea4e07214bf9957c04cd4da96521d2c75fe7c Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 14 Oct 2019 07:11:31 +1300 Subject: [PATCH] Fix 5.18 regression on membership handling Fixes a bug caused by https://github.com/civicrm/civicrm-core/commit/5b9d3ce80f1a64b39bdd63160ad0a1b960f2faed And picked up in test with https://github.com/civicrm/civicrm-core/pull/15399 --- CRM/Member/Form/MembershipRenewal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 7ff71dc844..02eb137ae5 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -588,7 +588,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { } // @todo Move this into CRM_Member_BAO_Membership::processMembership - $pending = ($this->_params['contribution_status_id'] == array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'))) ? TRUE : FALSE; + $pending = ($this->_params['contribution_status_id'] == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Pending')); list($membership) = CRM_Member_BAO_Membership::processMembership( $this->_contactID, $this->_params['membership_type_id'][1], $isTestMembership, $renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId, -- 2.25.1