Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.11.8, 4.0.5, 4.1
Description
Hello,
The grader report generate an exception with PHP 8.0.
The PHP error :
[04-Aug-2022 12:48:12 Europe/Paris] Default exception handler: Exception - Unsupported operand types: string * int
Debug:
Error code: generalexceptionmessage
- line 492 of /grade/report/grader/lib.php: TypeError thrown
- line 158 of /grade/report/grader/index.php: call to grade_report_grader->load_users()
PHP 8.0 seems to not appreciate the operation string*int.
Proposed (tested and working) solution :
diff grade/report/grader/lib.php.old grade/report/grader/lib.php.new
2015c2015
< return $this->get_pref('studentsperpage');
—
> return intval($this->get_pref('studentsperpage'));
Thanks a lot for all your work on Moodle !
Baptiste