Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-13847 backup/restore issues meta
  3. MDL-17370

Forum: PHP Warning when not ratings for max aggregate

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.5
    • 1.9.3, 2.0
    • Forum
    • None
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • MOODLE_19_STABLE
    • Easy

      While looking at MDL-17369, I came across the following PHP warning:

      Warning: max() [function.max]: Array must contain at least one element in /home/arborrow/Moodle/code/cvshead/mod/forum/lib.php on line 3584

      Attached is a patch file based on HEAD but could easily be applied to 1.9. Essentially I am just moving things around to avoid calling max if there are no ratings yet. Let me know if there are any questions.

      Peace - Anthony

            skodak Petr Skoda
            aborrow Anthony Borrow
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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