MDL-57777 rss: Return 404 when context not found.

This commit is contained in:
Michael Aherne 2017-01-26 10:45:52 +00:00
parent 5130953c8a
commit 655727381d

View File

@ -115,7 +115,11 @@ if ($token === "$inttoken") {
}
// 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);