From: Eileen McNaughton Date: Sun, 19 Jul 2015 10:24:25 +0000 (+1200) Subject: CRM-16867 saving membership types is blocked when key for a renew type is present... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a7cc055e609fa74da47c9124436deb2272f82974;p=civicrm-core.git CRM-16867 saving membership types is blocked when key for a renew type is present - even when the type has just been disabled --- diff --git a/CRM/Member/Form/MembershipBlock.php b/CRM/Member/Form/MembershipBlock.php index 1103a75524..33bdb359fe 100644 --- a/CRM/Member/Form/MembershipBlock.php +++ b/CRM/Member/Form/MembershipBlock.php @@ -302,8 +302,8 @@ class CRM_Member_Form_MembershipBlock extends CRM_Contribute_Form_ContributionPa $errors['is_separate_payment'] = ts('You need to enable Separate Membership Payment when online contribution page is configured for both Membership and Recurring Contribution'); } elseif (!empty($params['is_separate_payment'])) { - foreach ($params['membership_type'] as $mt => $dontCare) { - if (!empty($params["auto_renew_$mt"])) { + foreach ($params['membership_type'] as $mt => $isEnabled) { + if (!empty($params["auto_renew_$mt"]) && $isEnabled) { $errors["auto_renew_$mt"] = ts('You cannot enable both Recurring Contributions and Auto-renew memberships on the same online contribution page'); break; }