From ad501080d8f45e0ff834638184cfaee0d6750ed7 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 16 Nov 2018 14:55:38 +1300 Subject: [PATCH] Fix php7.2 notices on trying to count null --- templates/CRM/Contribute/Form/Contribution/Confirm.tpl | 4 ++-- templates/CRM/Contribute/Form/Contribution/Main.tpl | 2 +- templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl | 2 +- templates/CRM/Contribute/Form/Contribution/ThankYou.tpl | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl index 8d580a2ea59..8adea18fd02 100644 --- a/templates/CRM/Contribute/Form/Contribution/Confirm.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Confirm.tpl @@ -135,13 +135,13 @@ {/if} - {if $onbehalfProfile|@count} + {if $onbehalfProfile && $onbehalfProfile|@count}
{include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile prefix='onbehalf'}
{/if} - {if $honoreeProfileFields|@count} + {if $honoreeProfileFields && $honoreeProfileFields|@count}
{$soft_credit_type} diff --git a/templates/CRM/Contribute/Form/Contribution/Main.tpl b/templates/CRM/Contribute/Form/Contribution/Main.tpl index 52b102ed8b5..db82a07df4e 100644 --- a/templates/CRM/Contribute/Form/Contribution/Main.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Main.tpl @@ -204,7 +204,7 @@ {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="makeContribution"}
- {if $honoreeProfileFields|@count} + {if $honoreeProfileFields && $honoreeProfileFields|@count}
{crmRegion name="contribution-soft-credit-block"} {$honor_block_title} diff --git a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl index 4757a3131e3..983a6a8e77b 100644 --- a/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl +++ b/templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl @@ -41,7 +41,7 @@
{crmRegion name="onbehalf-block"} - {if $onBehalfOfFields|@count} + {if $onBehalfOfFields && $onBehalfOfFields|@count}
{$fieldSetTitle} {if $form.org_option} diff --git a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl index 8520b458b53..fcab862e37b 100644 --- a/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/Contribution/ThankYou.tpl @@ -188,13 +188,13 @@
{/if} - {if $onbehalfProfile|@count} + {if $onbehalfProfile && $onbehalfProfile|@count}
{include file="CRM/UF/Form/Block.tpl" fields=$onbehalfProfile prefix='onbehalf'}
{/if} - {if $honoreeProfileFields|@count} + {if $honoreeProfileFields && $honoreeProfileFields|@count}
{$soft_credit_type}