diff --git a/Modules/LearningModule/classes/class.ilLMTree.php b/Modules/LearningModule/classes/class.ilLMTree.php index 62508d63b8b1..c53291d467e5 100644 --- a/Modules/LearningModule/classes/class.ilLMTree.php +++ b/Modules/LearningModule/classes/class.ilLMTree.php @@ -70,7 +70,7 @@ public function getLastActivePage(): int " ORDER BY lm_tree.rgt DESC"; $set = $ilDB->query($sql); $row = $ilDB->fetchAssoc($set); - return (int) $row["obj_id"]; + return (int) ($row["obj_id"] ?? 0); } /**