CRM-19431 - CRM-19431: avoid pollution (in EntityTag) and use (in ContactType) of...
authorDave Jenkins <davej+git@circle-interactive.co.uk>
Tue, 15 Nov 2016 16:15:52 +0000 (16:15 +0000)
committerDave Jenkins <davej+git@circle-interactive.co.uk>
Tue, 15 Nov 2016 16:15:52 +0000 (16:15 +0000)
CRM/Contact/BAO/ContactType.php
CRM/Core/BAO/EntityTag.php

index bc4b1faf3b1db9f216fdc4a565acfe5325f9f77a..cea03684472c1721b7320a373725da4cc9652b45 100644 (file)
@@ -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'
         );
index b193cb7168ea1fec38eef09eefd0f9925ee39a90..a14e947ee74e4cdf502a801f239f352d4e7a9d18 100644 (file)
@@ -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), '- ');
       }
     }