Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75381

Grader report generate an exception with PHP 8.0

    XMLWordPrintable

Details

    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

      Attachments

        Activity

          People

            pholden Paul Holden
            baptiste.desprez Baptiste DESPREZ
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 55 minutes
                55m

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.