From 9afc5647db2f63ea33cc9724d21ad0d017a924f2 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Mon, 29 May 2023 17:13:05 +0100 Subject: [PATCH] Stop passing to membership::create --- CRM/Member/Form/Membership.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index d0ec67d4d1..6c3963de43 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -998,14 +998,14 @@ DESC limit 1"); $this->storeContactFields($this->_params); $this->beginPostProcess(); - $params = $softParams = $ids = []; + $params = $softParams = []; $this->processBillingAddress(); $formValues = $this->_params; $formValues = $this->setPriceSetParameters($formValues); if ($this->_id) { - $ids['membership'] = $params['id'] = $this->_id; + $params['id'] = $this->_id; } // Set variables that we normally get from context. @@ -1276,8 +1276,7 @@ DESC limit 1"); unset($membershipParams['contribution_status_id']); $membershipParams['skipLineItem'] = TRUE; unset($membershipParams['lineItems']); - // @todo stop passing $ids (membership and userId only are set above) - $this->setMembership((array) CRM_Member_BAO_Membership::create($membershipParams, $ids)); + $this->setMembership((array) CRM_Member_BAO_Membership::create($membershipParams)); $lineItem[$this->_priceSetId][$id]['entity_id'] = $this->membership['id']; $lineItem[$this->_priceSetId][$id]['entity_table'] = 'civicrm_membership'; -- 2.25.1