From: eileen Date: Wed, 4 Apr 2018 05:52:14 +0000 (+1200) Subject: Fix fatal error when selecting a /bin/bash price option. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c46645ba900c77d8d8f33b463c5c11764bf2bb8d;p=civicrm-core.git 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 --- diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index e85866fd61..c2ea32d0ce 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -766,7 +766,7 @@ WHERE li.contribution_id = %1"; )); 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',