It turns out the refund_trxn_id can be set erroneously - this might be a form issue - but we also want to avoid an error here
// CRM-17751.
if (isset($params['refund_trxn_id'])) {
$refundIDs = CRM_Core_BAO_FinancialTrxn::getRefundTransactionIDs($params['id']);
- if ($refundIDs['trxn_id'] != $params['refund_trxn_id']) {
+ if (!empty($refundIDs['financialTrxnId']) && $refundIDs['trxn_id'] != $params['refund_trxn_id']) {
civicrm_api3('FinancialTrxn', 'create', array('id' => $refundIDs['financialTrxnId'], 'trxn_id' => $params['refund_trxn_id']));
}
}