MDL-83136 course: Add missing value on unknowncategory exception message
This commit is contained in:
@@ -272,7 +272,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
||||
if (!$coursecat) {
|
||||
// Course category not found.
|
||||
if ($strictness == MUST_EXIST) {
|
||||
throw new moodle_exception('unknowncategory');
|
||||
throw new moodle_exception('unknowncategory', a: $id);
|
||||
}
|
||||
$coursecat = null;
|
||||
} else if (!$alwaysreturnhidden && !$coursecat->is_uservisible($user)) {
|
||||
|
||||
+1
-1
@@ -2178,7 +2178,7 @@ class moodle_page {
|
||||
global $DB;
|
||||
$category = $DB->get_record('course_categories', array('id' => $categoryid));
|
||||
if (!$category) {
|
||||
throw new moodle_exception('unknowncategory');
|
||||
throw new moodle_exception('unknowncategory', a: $categoryid);
|
||||
}
|
||||
$this->_categories[$category->id] = $category;
|
||||
$parentcategoryids = explode('/', trim($category->path, '/'));
|
||||
|
||||
Reference in New Issue
Block a user