[php8-compact] Fix failing CRM_Core_InvokeTest on php8
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 14 Jun 2021 05:30:45 +0000 (05:30 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 14 Jun 2021 05:30:45 +0000 (05:30 +0000)
templates/CRM/Contact/Page/DashBoardDashlet.tpl
templates/CRM/Form/body.tpl
templates/CRM/Form/default.tpl

index ac2ed7af3f23658b4a8e299ecfc7ea9bdd472c5b..aaf2ab62b08ee7313788dd2ee3e1da1b3c55bdf9 100644 (file)
@@ -9,7 +9,7 @@
 *}
 {include file="CRM/common/chart.tpl"}
 {* Alerts for critical configuration settings. *}
-{$communityMessages}
+{$communityMessages|default:''}
 <div class="clear"></div>
 <div class="crm-block crm-content-block">
 
index cec6c6271623aec720475bcb948afdc1372a1329..01c4c922731c524a40190581123019690ba948e2 100644 (file)
@@ -15,7 +15,7 @@
   <div>{$form.hidden}</div>
 {/if}
 
-{if ($snippet !== 'json') and !$suppressForm and count($form.errors) gt 0}
+{if ($snippet !== 'json') and empty($suppressForm) and count($form.errors) gt 0}
    <div class="messages crm-error">
        <i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i>
      {ts}Please correct the following errors in the form fields below:{/ts}
index cc280174c07a63591ab3321a9f299175322b577c..e9068d974ffdcc9c76d9210ee9e2aab67ed2e978 100644 (file)
@@ -7,7 +7,7 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
 *}
-{if ! $suppressForm}
+{if empty($suppressForm)}
 <form {$form.attributes} >
   {crmRegion name='form-top'}{/crmRegion}
 {/if}
@@ -18,7 +18,7 @@
     {include file=$tplFile}
   {/crmRegion}
 
-{if ! $suppressForm}
+{if empty($suppressForm)}
   {crmRegion name='form-bottom'}{/crmRegion}
 </form>
 {/if}