From 269c3d79254a24917e5d3609fd24cf10f2357a04 Mon Sep 17 00:00:00 2001 From: Thomas Hackl <hackl@data-quest.de> Date: Tue, 13 Jun 2023 16:02:58 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20"In=20einer=20neuen,=20leeren=20Insta?= =?UTF-8?q?llation=20k=C3=B6nnen=20mit=20PHP=208.0=20keine=20Eintr=C3=A4ge?= =?UTF-8?q?=20der=20Einrichtungshierarchie=20angelegt=20werden."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2733 Merge request studip/studip!1852 --- lib/classes/TreeAbstract.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/classes/TreeAbstract.class.php b/lib/classes/TreeAbstract.class.php index 9f546545d2a..69fedce91cb 100644 --- a/lib/classes/TreeAbstract.class.php +++ b/lib/classes/TreeAbstract.class.php @@ -203,7 +203,7 @@ class TreeAbstract { */ public function getKids($item_id) { - return (isset($this->tree_childs[$item_id]) && is_array($this->tree_childs[$item_id])) ? $this->tree_childs[$item_id] : null; + return (isset($this->tree_childs[$item_id]) && is_array($this->tree_childs[$item_id])) ? $this->tree_childs[$item_id] : []; } /** @@ -242,7 +242,7 @@ class TreeAbstract { $this->getKidsKids($kids[$i],true); } } - return (!$in_recursion) ? $kidskids : null; + return (!$in_recursion) ? $kidskids : []; } /** @@ -266,7 +266,7 @@ class TreeAbstract { $this->getNumKidsKids($kids[$i],true); } } - return (!$in_recursion) ? $num_kidskids : null; + return (!$in_recursion) ? $num_kidskids : 0; } /** -- GitLab