From 3b624e5826f3bd002446f257ae03456990df6aa2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 30 Sep 2014 20:39:33 +1300 Subject: [PATCH] CRM-15296 - fix to make tests pass since this prevents an e-Notice BUT need to check with Joe as the e-Notice seems to expose a real error and we should possibly reverse this & uncomment a couple of lines in the tests that are tied up with this too (in ContributionPageTest). the issue is that pending recurring contributions WITH memberships have no line items --- CRM/Contribute/BAO/Contribution.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index c3c9e086cc..ead367d0ca 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2931,6 +2931,13 @@ WHERE contribution_id = %1 "; 'entity_table' => 'civicrm_financial_item', 'financial_trxn_id' => $trxn->id, ); + if (empty($params['line_item'])) { + //CRM-15296 + //@todo - check with Joe regarding this situation - payment processors create pending transactions with no line items + // when creating recurring membership payment - there are 2 lines to comment out in contributonPageTest if fixed + // & this can be removed + return; + } foreach ($params['line_item'] as $fieldId => $fields) { foreach ($fields as $fieldValueId => $fieldValues) { $fparams = array( -- 2.25.1