--fixed for CRM-12018
authorPradeep Nayak <pradeep@pradeep.(none)>
Thu, 7 Mar 2013 08:50:15 +0000 (14:20 +0530)
committerPradeep Nayak <pradeep@pradeep.(none)>
Thu, 7 Mar 2013 08:50:15 +0000 (14:20 +0530)
CRM/Contribute/Form/Contribution/Main.php

index c470427f837b2ead0d93d8507bf69322d3dac16f..1e6b87d440520732effb22697a6473eef16b7284 100644 (file)
@@ -1309,7 +1309,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
       $is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $this->_priceSetId, 'is_quick_config');
       if ($is_quick_config) {
         foreach ($this->_priceSet['fields'] as $fieldKey => $fieldVal) {
-          if ($fieldVal['name'] == 'membership_amount') {
+          if ($fieldVal['name'] == 'membership_amount' && CRM_Utils_Array::value('price_' . $fieldId, $params)) {
             $fieldId     = $fieldVal['id'];
             $fieldOption = $params['price_' . $fieldId];
             $memPresent  = TRUE;
@@ -1320,7 +1320,9 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
               if ($fieldVal['name'] == 'other_amount') {
                 $proceFieldAmount = $this->_submitValues['price_' . $fieldId];
               }
-              else $proceFieldAmount = $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
+              else {
+                $proceFieldAmount = $fieldVal['options'][$this->_submitValues['price_' . $fieldId]]['amount'];
+              }
               unset($params['price_' . $fieldId]);
               break;
             }