CRM-18472 - Notice Fixes
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 2 May 2016 12:06:54 +0000 (17:36 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 2 May 2016 12:06:54 +0000 (17:36 +0530)
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/Form/Contribution/Confirm.php

index f65c46d05021eb4d6c9e1cfe3f10e70e97cda8a6..55365b66c7ff574f91147440fb54cc2e7c49d6dd 100644 (file)
@@ -2597,7 +2597,9 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         if (!empty($lineItem)) {
           $itemId = key($lineItem);
           foreach ($lineItem as &$eachItem) {
-            if (is_array($this->_relatedObjects['membership']) && array_key_exists($eachItem['membership_type_id'], $this->_relatedObjects['membership'])) {
+            if (isset($this->_relatedObjects['membership'])
+             && is_array($this->_relatedObjects['membership'])
+             && array_key_exists($eachItem['membership_type_id'], $this->_relatedObjects['membership'])) {
               $eachItem['join_date'] = CRM_Utils_Date::customFormat($this->_relatedObjects['membership'][$eachItem['membership_type_id']]->join_date);
               $eachItem['start_date'] = CRM_Utils_Date::customFormat($this->_relatedObjects['membership'][$eachItem['membership_type_id']]->start_date);
               $eachItem['end_date'] = CRM_Utils_Date::customFormat($this->_relatedObjects['membership'][$eachItem['membership_type_id']]->end_date);
index 3f82d8003c55d86a6bbdca819cda3aab33d1875d..b6ffa25239954ac5a2de800a4246e87c13115572 100644 (file)
@@ -1083,7 +1083,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
     $recurParams['trxn_id'] = CRM_Utils_Array::value('trxn_id', $params, $params['invoiceID']);
     $recurParams['financial_type_id'] = $contributionType->id;
 
-    if ($form->_values['is_monetary']) {
+    if (!empty($form->_values['is_monetary'])) {
       $recurParams['payment_instrument_id'] = 1;
     }