From 8e68436afdc53fb81fef0f3a193c98308a8ef308 Mon Sep 17 00:00:00 2001 From: Civiware Solutions Date: Thu, 11 Oct 2018 03:10:40 +0530 Subject: [PATCH] Use $_POST for some cases where params is not equal to submit values --- CRM/EntityTemplates/Utils.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/EntityTemplates/Utils.php b/CRM/EntityTemplates/Utils.php index 8c1a4d1..9d27a1a 100644 --- a/CRM/EntityTemplates/Utils.php +++ b/CRM/EntityTemplates/Utils.php @@ -89,6 +89,9 @@ class CRM_EntityTemplates_Utils { * @param array $params */ public static function addTemplate($objectName, $params) { + if (empty($params['entity_template'])) { + $params = $_POST; + } if (CRM_Utils_Array::value('entity_template', $params) == $objectName) { $id = NULL; if (!empty($params['entity_template_id'])) {