From 947b6f2fac6dc85eba72a492fc2b1fa8ed0fea61 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 10 Apr 2022 10:50:34 +0100 Subject: [PATCH] Avoid PHP notices on FinancialAccount table --- CRM/Financial/Page/FinancialAccount.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CRM/Financial/Page/FinancialAccount.php b/CRM/Financial/Page/FinancialAccount.php index 51202f77d7..35271c083c 100644 --- a/CRM/Financial/Page/FinancialAccount.php +++ b/CRM/Financial/Page/FinancialAccount.php @@ -105,6 +105,14 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { } } + // Ensure keys are always set to avoid Smarty notices + if (!isset($contributionType[$dao->id]['accounting_code'])) { + $contributionType[$dao->id]['accounting_code'] = FALSE; + } + if (!isset($contributionType[$dao->id]['account_type_code'])) { + $contributionType[$dao->id]['account_type_code'] = FALSE; + } + $contributionType[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), $action, ['id' => $dao->id], ts('more'), -- 2.25.1