Ensure children key is always set in tag buildTree
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 24 Sep 2022 11:32:10 +0000 (12:32 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 24 Sep 2022 11:32:10 +0000 (12:32 +0100)
CRM/Core/BAO/Tag.php

index 10541942b00e43fad7706f0be668d14547183412..d02fb85db4dc3b882b751fa3ce70036c117c02ad 100644 (file)
@@ -89,6 +89,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag {
       $thisref['name'] = $dao->name;
       $thisref['description'] = $dao->description;
       $thisref['is_selectable'] = $dao->is_selectable;
+      $thisref['children'] = [];
 
       if (!$dao->parent_id) {
         $this->tree[$dao->id] = &$thisref;