From dc8c6ebeba7e7d789e919c90064a942014bdecda Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 30 Jun 2021 21:11:03 -0400 Subject: [PATCH] Fix possibly undefined custom groupTree tpl variable --- templates/CRM/Activity/Form/Search/Common.tpl | 2 +- templates/CRM/Contact/Form/Search/Criteria/Location.tpl | 2 +- templates/CRM/Contact/Form/Search/Criteria/Relationship.tpl | 2 +- templates/CRM/Contribute/Form/Search/Common.tpl | 2 +- templates/CRM/Contribute/Form/Search/ContributionRecur.tpl | 2 +- templates/CRM/Grant/Form/Search/Common.tpl | 2 +- templates/CRM/Member/Form/Search/Common.tpl | 2 +- templates/CRM/Pledge/Form/Search/Common.tpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/CRM/Activity/Form/Search/Common.tpl b/templates/CRM/Activity/Form/Search/Common.tpl index 954984a9fc..4b26623da3 100644 --- a/templates/CRM/Activity/Form/Search/Common.tpl +++ b/templates/CRM/Activity/Form/Search/Common.tpl @@ -117,7 +117,7 @@ {include file="CRM/Campaign/Form/addCampaignToComponent.tpl" campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''} -{if $activityGroupTree} +{if !empty($activityGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$activityGroupTree showHideLinks=false} diff --git a/templates/CRM/Contact/Form/Search/Criteria/Location.tpl b/templates/CRM/Contact/Form/Search/Criteria/Location.tpl index 0b85a39a30..251b781753 100644 --- a/templates/CRM/Contact/Form/Search/Criteria/Location.tpl +++ b/templates/CRM/Contact/Form/Search/Criteria/Location.tpl @@ -118,7 +118,7 @@ - {if $addressGroupTree} + {if !empty($addressGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$addressGroupTree showHideLinks=false} diff --git a/templates/CRM/Contact/Form/Search/Criteria/Relationship.tpl b/templates/CRM/Contact/Form/Search/Criteria/Relationship.tpl index 75ca96884b..35a22fd924 100644 --- a/templates/CRM/Contact/Form/Search/Criteria/Relationship.tpl +++ b/templates/CRM/Contact/Form/Search/Criteria/Relationship.tpl @@ -55,7 +55,7 @@ {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName="relation_active_period_date" hideRelativeLabel=1} - {if $relationshipGroupTree} + {if !empty($relationshipGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$relationshipGroupTree showHideLinks=false} diff --git a/templates/CRM/Contribute/Form/Search/Common.tpl b/templates/CRM/Contribute/Form/Search/Common.tpl index 8f79a3bf40..5fa9bfb995 100644 --- a/templates/CRM/Contribute/Form/Search/Common.tpl +++ b/templates/CRM/Contribute/Form/Search/Common.tpl @@ -178,7 +178,7 @@ campaignTrClass='' campaignTdClass=''} -{if $contributionGroupTree} +{if !empty($contributionGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$contributionGroupTree showHideLinks=false} diff --git a/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl b/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl index 2ec773e418..0988205710 100644 --- a/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl +++ b/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl @@ -70,7 +70,7 @@ {$form.contribution_recur_trxn_id.html} - {if $contributionRecurGroupTree} + {if !empty($contributionRecurGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$contributionRecurGroupTree showHideLinks=false} diff --git a/templates/CRM/Grant/Form/Search/Common.tpl b/templates/CRM/Grant/Form/Search/Common.tpl index 5fd4603973..be795cc52e 100644 --- a/templates/CRM/Grant/Form/Search/Common.tpl +++ b/templates/CRM/Grant/Form/Search/Common.tpl @@ -44,7 +44,7 @@ {/foreach} -{if $grantGroupTree} +{if !empty($grantGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$grantGroupTree showHideLinks=false} diff --git a/templates/CRM/Member/Form/Search/Common.tpl b/templates/CRM/Member/Form/Search/Common.tpl index c45e0aa67c..faf801b4af 100644 --- a/templates/CRM/Member/Form/Search/Common.tpl +++ b/templates/CRM/Member/Form/Search/Common.tpl @@ -60,7 +60,7 @@ {include file="CRM/Campaign/Form/addCampaignToComponent.tpl" campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''} -{if $membershipGroupTree} +{if !empty($membershipGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$membershipGroupTree showHideLinks=false} diff --git a/templates/CRM/Pledge/Form/Search/Common.tpl b/templates/CRM/Pledge/Form/Search/Common.tpl index 36aa7f3d8a..1f5c53e966 100644 --- a/templates/CRM/Pledge/Form/Search/Common.tpl +++ b/templates/CRM/Pledge/Form/Search/Common.tpl @@ -80,7 +80,7 @@ {include file="CRM/Campaign/Form/addCampaignToComponent.tpl" campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''} -{if $pledgeGroupTree} +{if !empty($pledgeGroupTree)} {include file="CRM/Custom/Form/Search.tpl" groupTree=$pledgeGroupTree showHideLinks=false} -- 2.25.1