Skip to content

Commit

Permalink
37908 - catch empty nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolf-ilias committed Sep 14, 2023
1 parent 3c3c508 commit b8d953b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Services/Tree/classes/class.ilNestedSetTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public function getSubTreeQuery(
*/
public function getRelation(array $a_node_a, array $a_node_b): int
{
if ($a_node_a === [] || $a_node_b === []) {
return ilTree::RELATION_NONE;
}
if ($a_node_a['child'] == $a_node_b['child']) {
return ilTree::RELATION_EQUALS;
}
Expand Down

0 comments on commit b8d953b

Please sign in to comment.