From 2390fd4572a304993e1b0ea162c7cee9916ca411 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 23 Dec 2021 18:19:54 +1300 Subject: [PATCH] E-notice fix (smarty) --- CRM/Contribute/Selector/Search.php | 3 ++- templates/CRM/Contribute/Form/Selector.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Selector/Search.php b/CRM/Contribute/Selector/Search.php index fed38afc1e..3f9a5dc2fb 100644 --- a/CRM/Contribute/Selector/Search.php +++ b/CRM/Contribute/Selector/Search.php @@ -356,7 +356,8 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C ); $checkLineItem = FALSE; - $row = []; + // Set defaults to empty to prevent e-notices. + $row = ['amount_level' => '']; // Now check for lineItems if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { $lineItems = CRM_Price_BAO_LineItem::getLineItemsByContributionID($result->id); diff --git a/templates/CRM/Contribute/Form/Selector.tpl b/templates/CRM/Contribute/Form/Selector.tpl index d5d39808d5..7b377458f2 100644 --- a/templates/CRM/Contribute/Form/Selector.tpl +++ b/templates/CRM/Contribute/Form/Selector.tpl @@ -48,7 +48,7 @@   {$row.total_amount|crmMoney:$row.currency} - {if !empty($row.amount_level) }
({$row.amount_level}){/if} + {if $row.amount_level}
({$row.amount_level}){/if} {if $row.contribution_recur_id && $row.is_template}
{ts}(Recurring Template){/ts} {elseif $row.contribution_recur_id } -- 2.25.1