From 037656260bc270eca7d4021346b68507ed43eb51 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 16 Nov 2021 09:17:23 +1300 Subject: [PATCH] Use smarty:nodefaults with smarty.get smarty.get is a special smary function to access _GET and I think the nodefaults is the only option (ie we can't ensure it is set) --- templates/CRM/Form/validate.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CRM/Form/validate.tpl b/templates/CRM/Form/validate.tpl index e1b4a39a20..297364a9d6 100644 --- a/templates/CRM/Form/validate.tpl +++ b/templates/CRM/Form/validate.tpl @@ -9,7 +9,7 @@ *} {* Initialize jQuery validate on a form *} {* Extra params and functions may be added to the CRM.validate object before this template is loaded *} -{if empty($crm_form_validate_included) and ((isset($smarty.get.snippet) and $smarty.get.snippet neq 'json') or !isset($smarty.get.snippet)) and !empty($form) and !empty($form.formClass)} +{if empty($crm_form_validate_included) && ((isset($smarty.get.snippet|smarty:nodefaults) && $smarty.get.snippet neq 'json') || !isset($smarty.get.snippet|smarty:nodefaults)) && !empty($form) && !empty($form.formClass)} {assign var=crm_form_validate_included value=1} {literal}