Skip to content

Commit a01a9bb

Browse files
committed
Minor - Avoid notice
1 parent 4681970 commit a01a9bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main/gamification/my_progress.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
);
3434

3535
$lastCourseAccess = $trackCourseAccessRepository->getLastAccessByUser($user);
36-
$lastSessionId = $lastCourseAccess->getSessionId();
36+
if ($lastCourseAccess) {
37+
$lastSessionId = $lastCourseAccess->getSessionId();
38+
}
3739

3840
if (!empty($lastSessionId)) {
3941
$urlWithSession = api_get_self() . '?' . http_build_query([

0 commit comments

Comments
 (0)