From c46645ba900c77d8d8f33b463c5c11764bf2bb8d Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 4 Apr 2018 17:52:14 +1200 Subject: [PATCH] Fix fatal error when selecting a /bin/bash price option. The code for creating a new price option creates a new financial transaction but when choosing a /bin/bash price option it fails as the api does not accept /bin/bash EntityFinancialTrxn, skip if /bin/bash --- CRM/Price/BAO/LineItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index e85866fd61bc..c2ea32d0cec9 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -766,7 +766,7 @@ public static function changeFeeSelections( )); unset($updateFinancialItemInfoValues['financialTrxn']); } - elseif (!empty($updateFinancialItemInfoValues['link-financial-trxn'])) { + elseif (!empty($updateFinancialItemInfoValues['link-financial-trxn']) && $newFinancialItem->amount != 0) { civicrm_api3('EntityFinancialTrxn', 'create', array( 'entity_id' => $newFinancialItem->id, 'entity_table' => 'civicrm_financial_item',