From 0c1caf1823fd0a02c79a62d07b148fab30355300 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 8 Jun 2021 04:34:47 +0000 Subject: [PATCH] [php8-compact] Fix Report tests failing on php8 --- templates/CRM/Report/Form.tpl | 4 +- templates/CRM/Report/Form/Layout/Graph.tpl | 8 +-- templates/CRM/Report/Form/Layout/Table.tpl | 16 +++--- templates/CRM/Report/Form/Statistics.tpl | 62 ++++++++++++---------- 4 files changed, 48 insertions(+), 42 deletions(-) diff --git a/templates/CRM/Report/Form.tpl b/templates/CRM/Report/Form.tpl index 3520bb9484..3ceffb9aa5 100644 --- a/templates/CRM/Report/Form.tpl +++ b/templates/CRM/Report/Form.tpl @@ -16,7 +16,7 @@ {elseif $section eq 2}
{*include the table layout*} - {if !$chartEnabled || !$chartSupported} + {if empty($chartEnabled) || empty($chartSupported)} {include file="CRM/Report/Form/Layout/Table.tpl"} {/if}
@@ -39,7 +39,7 @@ {*include the table layout*} - {if !$chartEnabled || !$chartSupported} + {if empty($chartEnabled) || empty($chartSupported)} {include file="CRM/Report/Form/Layout/Table.tpl"} {/if}
diff --git a/templates/CRM/Report/Form/Layout/Graph.tpl b/templates/CRM/Report/Form/Layout/Graph.tpl index 0add07e2ea..d3de9439ed 100644 --- a/templates/CRM/Report/Form/Layout/Graph.tpl +++ b/templates/CRM/Report/Form/Layout/Graph.tpl @@ -9,7 +9,7 @@ *} {assign var=uploadURL value=$config->imageUploadURL|replace:'/persist/contribute/':'/persist/'} {* Display weekly,Quarterly,monthly and yearly contributions using pChart (Bar and Pie) *} -{if $chartEnabled and $chartSupported} +{if !empty($chartEnabled) and !empty($chartSupported)}
{if $outputMode eq 'print' OR $outputMode eq 'pdf'} @@ -19,11 +19,11 @@
{/if} -{if !$printOnly} {* NO print section starts *} - {if !$section} +{if empty($printOnly)} {* NO print section starts *} + {if !empty($section)} {include file="CRM/common/chart.tpl" divId="chart_$uniqueId"} {/if} - {if $chartData} + {if !empty($chartData)} {literal}