Skip to content

Commit

Permalink
User portal: Add check on link to avoid infinite loop on my courses l…
Browse files Browse the repository at this point in the history
…ist - refs #17714
  • Loading branch information
ywarnier committed Sep 15, 2020
1 parent 8dd7687 commit bbf69bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user_portal.php
Expand Up @@ -268,7 +268,7 @@ function changeMyCoursesView(inView) {
$count_of_sessions == 0 &&
$count_of_courses_no_sessions == 1
) {
if (!empty($courseAndSessions['courses']) && isset($courseAndSessions['courses'][0])) {
if (!empty($courseAndSessions['courses']) && isset($courseAndSessions['courses'][0]) && !empty($courseAndSessions['courses'][0]['link'])) {
header("Location: {$courseAndSessions['courses'][0]['link']}");
exit;
}
Expand Down

0 comments on commit bbf69bb

Please sign in to comment.