MDL-83136 course: Add missing value on unknowncategory exception message

This commit is contained in:
Julien Boulen
2025-02-21 09:25:18 +01:00
parent e06475d8ae
commit f063ef682f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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, '/'));