From: jitendrapurohit Date: Mon, 2 May 2016 12:06:54 +0000 (+0530) Subject: CRM-18472 - Notice Fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7c063f320ee8b66161f5ff95e30218dbb60d7efc;p=civicrm-core.git CRM-18472 - Notice Fixes --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index f65c46d050..55365b66c7 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -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); diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 3f82d8003c..b6ffa25239 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -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; }