From fb4aa4d91a2c3d92f242caf8a704589880e7bbb5 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 2 Sep 2014 13:26:08 +0530 Subject: [PATCH] Additional fix --- CRM/Contribute/Form/Contribution/Main.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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']; } } -- 2.25.1