From: monishdeb Date: Tue, 2 Sep 2014 07:56:08 +0000 (+0530) Subject: Additional fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fb4aa4d91a2c3d92f242caf8a704589880e7bbb5;p=civicrm-core.git Additional fix --- diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 3c2ee8fecd..bc0fd4a79a 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -842,13 +842,13 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $priceFieldIDS[] = $fields['price_' . $priceId]; } - if (CRM_Utils_Array::value('options', $value) && ( - ($fields['price_' . $priceId] == $val['id']) || - (isset($fields['price_' . $priceId]) && !empty($fields['price_' . $priceId][$val['id']])) - ) - ) { + if (CRM_Utils_Array::value('options', $value)) { foreach ($value['options'] as $val) { - if (CRM_Utils_Array::value('membership_type_id', $val)) { + if (CRM_Utils_Array::value('membership_type_id', $val) && ( + ($fields['price_' . $priceId] == $val['id']) || + (isset($fields['price_' . $priceId]) && !empty($fields['price_' . $priceId][$val['id']])) + ) + ) { $priceFieldMemTypes[] = $val['membership_type_id']; } }