-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
4.2.5, 4.3.2
-
3
-
Team Alpha - Planning I2-2024
Exception - array_key_exists(): Argument #2 ($array) must be of type array, null given |
|
More information about this error |
|
Debug info:
|
Error code: generalexceptionmessage×Dismiss this notification |
Stack trace:
|
line 2187 of /lib/grade/grade_category.php: TypeError thrown |
line 2042 of /lib/grade/grade_category.php: call to grade_category->get_children() |
line 2339 of /grade/lib.php: call to grade_category::fetch_course_tree() |
line 148 of /grade/report/grader/lib.php: call to grade_tree->__construct() |
line 118 of /grade/report/grader/index.php: call to grade_report_grader->__construct() |
updating:
while (array_key_exists($sortorder, $cats[$cat->parent]->children)) |
{
|
//debugging("$sortorder exists in cat loop"); |
$sortorder++;
|
$cats[$cat->parent]->children[$sortorder] = &$cats[$catid];
|
}
|
to:
if (!is_null($cats[$cat->parent])) { |
while (array_key_exists($sortorder, $cats[$cat->parent]->children)) { |
//debugging("$sortorder exists in cat loop"); |
$sortorder++;
|
$cats[$cat->parent]->children[$sortorder] = &$cats[$catid];
|
}
|
}
|
adds a sanity check to ensure the non-existing children are not calculated.
- has a non-specific relationship to
-
MDL-80053 Exception "array_merge" on grader report without grade items and category total
-
- Waiting for component lead review
-