Skip to content

Commit

Permalink
MDL-57777 rss: Return 404 when context not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
micaherne committed Jan 31, 2017
1 parent 5130953 commit 6557273
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rss/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@
}

// Check the context actually exists.
list($context, $course, $cm) = get_context_info_array($contextid);
try {
list($context, $course, $cm) = get_context_info_array($contextid);
} catch (dml_missing_record_exception $e) {
rss_error();
}

$PAGE->set_context($context);

Expand Down

0 comments on commit 6557273

Please sign in to comment.