From ae9e89a0a031e07b6dd755250e5c518c7e3e4a17 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 6 Nov 2021 13:03:30 +1300 Subject: [PATCH] Enotice fix for footer.tpl Ensure that contactId is always present --- CRM/Core/Page.php | 10 +++++++++- templates/CRM/common/footer.tpl | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 46ced4b0bd..6150a5a2af 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -105,7 +105,15 @@ class CRM_Core_Page { * * @var string[] */ - public $expectedSmartyVariables = ['breadcrumb', 'pageTitle', 'isForm', 'hookContent', 'hookContentPlacement']; + public $expectedSmartyVariables = [ + 'breadcrumb', + 'pageTitle', + 'isForm', + 'hookContent', + 'hookContentPlacement', + // required for footer.tpl + 'contactId', + ]; /** * Class constructor. diff --git a/templates/CRM/common/footer.tpl b/templates/CRM/common/footer.tpl index c781062d36..fbb95e2cef 100644 --- a/templates/CRM/common/footer.tpl +++ b/templates/CRM/common/footer.tpl @@ -9,7 +9,7 @@ *} {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')} {include file="CRM/common/accesskeys.tpl"} - {if !empty($contactId)} + {if $contactId} {include file="CRM/common/contactFooter.tpl"} {/if} -- 2.25.1