Stop returning createdMemberships.
authoreileen <emcnaughton@wikimedia.org>
Mon, 20 Aug 2018 03:48:00 +0000 (15:48 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 11 Oct 2018 11:05:22 +0000 (12:05 +0100)
This parameter is built up purely to set the status message, which I argue should be
set 'as she goes' saving us building up complex variables. Removing this
var will help us simplify the earlier loops

CRM/Member/Form/Membership.php

index 2caafe6fd2c2c24f8714b3ee5791fac1730aa5e4..272b7bf0f045e65194e79a6598f349b20500e1cd 100644 (file)
@@ -1103,8 +1103,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
    * Submit function.
    *
    * This is also accessed by unit tests.
-   *
-   * @return array
    */
   public function submit() {
     $isTest = ($this->_mode == 'test') ? 1 : 0;
@@ -1726,7 +1724,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
     $isRecur = CRM_Utils_Array::value('is_recur', $params);
     $this->updateContributionOnMembershipTypeChange($params, $membership);
     $this->setStatusMessage($membership, $endDate, $receiptSent, $membershipTypes, $createdMemberships, $isRecur, $calcDates, $mailSend);
-    return $createdMemberships;
   }
 
   /**