mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-57777 rss: Return 404 when context not found.
This commit is contained in:
parent
3e276d6efa
commit
72b489ef65
1 changed files with 5 additions and 1 deletions
|
@ -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 (Exception $e) {
|
||||
rss_error();
|
||||
}
|
||||
|
||||
$PAGE->set_context($context);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue