From e79a5cb91f6df5ca5c29b1b3efd828645c9be7f1 Mon Sep 17 00:00:00 2001 From: Dave Jenkins Date: Tue, 15 Nov 2016 16:15:52 +0000 Subject: [PATCH] CRM-19431 - CRM-19431: avoid pollution (in EntityTag) and use (in ContactType) of CRM_Core_DAO::$_nullArray. --- CRM/Contact/BAO/ContactType.php | 3 ++- CRM/Core/BAO/EntityTag.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/ContactType.php b/CRM/Contact/BAO/ContactType.php index bc4b1faf3b..cea0368447 100644 --- a/CRM/Contact/BAO/ContactType.php +++ b/CRM/Contact/BAO/ContactType.php @@ -95,8 +95,9 @@ WHERE parent_id IS NULL $sql .= " AND is_active = 1"; } + $params = array(); $dao = CRM_Core_DAO::executeQuery($sql, - CRM_Core_DAO::$_nullArray, + $params, FALSE, 'CRM_Contact_DAO_ContactType' ); diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index b193cb7168..a14e947ee7 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -412,7 +412,8 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { // Output tag list as nested hierarchy // TODO: This will only work when api.entity is "entity_tag". What about others? if ($context == 'search' || $context == 'create') { - return CRM_Core_BAO_Tag::getTags(CRM_Utils_Array::value('entity_table', $props, 'civicrm_contact'), CRM_Core_DAO::$_nullArray, CRM_Utils_Array::value('parent_id', $params), '- '); + $dummyArray = array(); + return CRM_Core_BAO_Tag::getTags(CRM_Utils_Array::value('entity_table', $props, 'civicrm_contact'), $dummyArray, CRM_Utils_Array::value('parent_id', $params), '- '); } } -- 2.25.1