aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/TreeAbstract.class.php
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2023-06-13 16:02:58 +0000
committerThomas Hackl <hackl@data-quest.de>2023-06-13 16:02:58 +0000
commit269c3d79254a24917e5d3609fd24cf10f2357a04 (patch)
tree2ebde3d3f0e2f0f3a22001082eb5d9db4752ee0a /lib/classes/TreeAbstract.class.php
parent132d580c00ef1e6fff959e2928107e35aa9c0517 (diff)
Resolve "In einer neuen, leeren Installation können mit PHP 8.0 keine Einträge der Einrichtungshierarchie angelegt werden."
Closes #2733 Merge request studip/studip!1852
Diffstat (limited to 'lib/classes/TreeAbstract.class.php')
-rw-r--r--lib/classes/TreeAbstract.class.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/classes/TreeAbstract.class.php b/lib/classes/TreeAbstract.class.php
index 9f54654..69fedce 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;
}
/**