diff --git a/main/lp/learnpathItem.class.php b/main/lp/learnpathItem.class.php index e8bd90f6a5..5400bbaaff 100755 --- a/main/lp/learnpathItem.class.php +++ b/main/lp/learnpathItem.class.php @@ -4113,8 +4113,10 @@ class learnpathItem } } - // It updates the last progress only in case. - $_SESSION['oLP']->updateLpProgress(); + // It updates the last progress only in case. + if (is_object($_SESSION['oLP'])) { + $_SESSION['oLP']->updateLpProgress(); + } if ($debug) { error_log('End of learnpathItem::write_to_db()', 0);