MDL-34549 libraries: Changing strictness of context::instance_by_id() when required
This commit is contained in:
@@ -1023,7 +1023,7 @@ class question_type {
|
||||
protected function get_context_by_category_id($category) {
|
||||
global $DB;
|
||||
$contextid = $DB->get_field('question_categories', 'contextid', array('id'=>$category));
|
||||
$context = context::instance_by_id($contextid);
|
||||
$context = context::instance_by_id($contextid, IGNORE_MISSING);
|
||||
return $context;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user