From 59878361c52ef3e0b4eea7ca48d68dc794c49eec Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 30 Mar 2018 15:16:40 +0200 Subject: [PATCH] Minor - fix php warning --- main/lp/learnpath.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index f1335292e9..d6d12cb55a 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -12947,7 +12947,11 @@ EOD; */ private static function get_level_for_item($items, $currentItemId) { - $parentItemId = $items[$currentItemId]->parent; + $parentItemId = 0; + if (isset($items[$currentItemId])) { + $parentItemId = $items[$currentItemId]->parent; + } + if ($parentItemId == 0) { return 0; } else {