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

PHP 8.2: ksort(...) - Question

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • Hide

      No tests required.

      Show
      No tests required.
    • 1
    • Team Hedgehog 2023 Sprint 1.3
    • Small

      Based on an Audit of the code, this component has the following uses of ksort without an explicit sort order which means SORT_REGULAR is applied by default and this sort behavior changes in PHP 8.2.
      See: https://php.watch/versions/8.2/ksort-SORT_REGULAR-order-changes

      Instances:

      • ./question/classes/statistics/questions/calculator.php:                ksort($this->randomselectors[$key]);
      • ./question/classes/statistics/questions/calculated.php:        ksort($this->variantstats);
      • ./question/classes/local/bank/random_question_loader.php:        ksort($this->availablequestionscache[$categorykey]);
      • ./question/bank/columnsortorder/tests/column_manager_test.php:        ksort($currentconfig);
      • ./question/type/multianswer/question.php:        ksort($simulatedresponse);
      • ./question/type/match/question.php:        ksort($simulatedresponse);
      • ./question/type/multichoice/question.php:        ksort($simulatedresponse);
      • ./question/type/calculated/questiontype.php:        ksort($dataitems);
      • ./question/type/calculated/questiontype.php:        ksort($fromform->definition);
      • ./question/type/calculatedsimple/questiontype.php:            ksort($question->definition);
      • ./question/type/calculatedsimple/edit_calculatedsimple_form.php:                ksort($fromformdefinition);
      • ./question/engine/bank.php:        ksort($sortorder);

            david.woloszyn@moodle.com David Woloszyn
            matt.porritt@moodle.com Matt Porritt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 1 minute
                2h 1m

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