Learnpath: Avoid calling function if the object does not existe to avoid error logs on a NULL value -refs BT#20099

pull/4359/head
NicoDucou 3 years ago
parent ad7a62872e
commit b348f8ed62
  1. 6
      main/lp/learnpathItem.class.php

@ -4113,8 +4113,10 @@ class learnpathItem
} }
} }
// It updates the last progress only in case. // It updates the last progress only in case.
$_SESSION['oLP']->updateLpProgress(); if (is_object($_SESSION['oLP'])) {
$_SESSION['oLP']->updateLpProgress();
}
if ($debug) { if ($debug) {
error_log('End of learnpathItem::write_to_db()', 0); error_log('End of learnpathItem::write_to_db()', 0);

Loading…
Cancel
Save