From: Tim Mallezie Date: Wed, 13 May 2015 19:04:24 +0000 (+0200) Subject: fix warning when there are no tags X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=54d33f2843e629545f6bf6233cf02a1a2cf4b5ba;p=civicrm-core.git fix warning when there are no tags --- diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index 9d7e976b29..0e76178d00 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -100,6 +100,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE); $refs = array(); + $this->tree = array(); while ($dao->fetch()) { $thisref = &$refs[$dao->id]; @@ -115,7 +116,6 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $refs[$dao->parent_id]['children'][$dao->id] = &$thisref; } } - } /**