From a369f33f079a952acefd5aef58e682a37b8520e9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 1 May 2023 11:52:20 +1200 Subject: [PATCH] Reduce notices by checking if key exists --- templates/CRM/Report/Form/Layout/Table.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Report/Form/Layout/Table.tpl b/templates/CRM/Report/Form/Layout/Table.tpl index 0f3e6ef22a..871a7b97ed 100644 --- a/templates/CRM/Report/Form/Layout/Table.tpl +++ b/templates/CRM/Report/Form/Layout/Table.tpl @@ -98,7 +98,7 @@ {assign var=fieldHover value=$field|cat:"_hover"} {assign var=fieldClass value=$field|cat:"_class"} - {if !empty($row.$fieldLink)} + {if array_key_exists($fieldLink, $row) && $row.$fieldLink} {/if} @@ -130,7 +130,7 @@ {$row.$field} {/if} - {if !empty($row.$fieldLink)}{/if} + {if array_key_exists($fieldLink, $row) && $row.$fieldLink}{/if} {/foreach} -- 2.25.1