CRM-15250 fix - membership created and marked current when transaction declined ...
authormonishdeb <monish.deb@webaccessglobal.com>
Tue, 9 Sep 2014 12:21:14 +0000 (17:51 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Tue, 9 Sep 2014 12:21:14 +0000 (17:51 +0530)
https://issues.civicrm.org/jira/browse/CRM-15250

CRM/Member/BAO/Membership.php

index 3ce24572f08bbb6caebbde99b1bdf7a64974393b..3ba09975e33010a3b4c4cdcb4dd62d9ddfe8b388 100644 (file)
@@ -1315,7 +1315,7 @@ AND civicrm_membership.is_test = %2";
       $form->_params['campaign_id'] = $membershipParams['onbehalf']['member_campaign_id'];
     }
     //@todo it should no longer be possible for it to get to this point & membership to not be an array
-    if (is_array($membershipTypeIDs)) {
+    if (is_array($membershipTypeIDs) && !empty($membershipContributionID)) {
       $typesTerms = CRM_Utils_Array::value('types_terms', $membershipParams, array());
       foreach ($membershipTypeIDs as $memType) {
         $numTerms = CRM_Utils_Array::value($memType, $typesTerms, 1);