From 2f5a3b0994385c9fd7eb1bf52e3d109bf2661d07 Mon Sep 17 00:00:00 2001 From: Julio Date: Tue, 28 Nov 2017 14:33:52 +0100 Subject: [PATCH] Fix PHP warnings --- main/lp/learnpath.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index c58008f7d5..5a85bcdc2f 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -3179,7 +3179,9 @@ class learnpath } $listParent[] = $subtree; } - if (!in_array($subtree['type'], $dirTypes) && $subtree['parent'] == null ) { + if (!in_array($subtree['type'], $dirTypes) && + ((isset($subtree['parent']) && $subtree['parent'] == null) || !isset($subtree['parent'])) + ) { $classStatus = [ 'not attempted' => 'scorm_not_attempted', 'incomplete' => 'scorm_not_attempted',