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

When on the new course form I get a php warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.6, 2.3.3
    • 2.4
    • Course
    • MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      0. Enable debugging display in the site with debug developer level.
      1. Log-in as admin.

      2. Go to Admin -> Courses -> Course default settings.
      3. Set "Maximum upload size" to any of the available values. Annotate it and also the list of available values.
      4. Save changes to the settings page.

      5. Go to Admin -> Courses -> Add/Edit Courses
      6. Click the "Add course" button. The course edit for will be shown.
      7. TEST: No PHP warning about "maxbytes" is shown/logged.
      8. TEST: The "Maximum upload size" popup setting shows the values and the default annotated in point 3.
      9. Change the "Maximum upload size" to another value. Annotate it.
      10. Complete the form (required fields) and save it. That will lead to the creation of a new course.

      11. Go to the course and edit its settings.
      12. TEST: No PHP warning about "maxbytes" is shown/logged.
      13. TEST: The "Maximum upload size" popup setting shows the values and the default annotated in point 9.

      That's all!

      Show
      0. Enable debugging display in the site with debug developer level. 1. Log-in as admin. 2. Go to Admin -> Courses -> Course default settings. 3. Set "Maximum upload size" to any of the available values. Annotate it and also the list of available values. 4. Save changes to the settings page. 5. Go to Admin -> Courses -> Add/Edit Courses 6. Click the "Add course" button. The course edit for will be shown. 7. TEST: No PHP warning about "maxbytes" is shown/logged. 8. TEST: The "Maximum upload size" popup setting shows the values and the default annotated in point 3. 9. Change the "Maximum upload size" to another value. Annotate it. 10. Complete the form (required fields) and save it. That will lead to the creation of a new course. 11. Go to the course and edit its settings. 12. TEST: No PHP warning about "maxbytes" is shown/logged. 13. TEST: The "Maximum upload size" popup setting shows the values and the default annotated in point 9. That's all!

      If I go to site admin > courses > add/edit courses then click on "add a new course" I get the following output.

      Notice: Undefined property: stdClass::$maxbytes in /home/andrew/Desktop/code/moodle/int/master/course/edit_form.php on line 159

            stronk7 Eloy Lafuente (stronk7)
            andyjdavis Andrew Davis
            Sam Hemelryk Sam Hemelryk
            Michael de Raadt Michael de Raadt
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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