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

User profile 'Forum Posts' tab throws error.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.9
    • Forum
    • None
    • MOODLE_19_STABLE

      If you click on the 'Forum Posts' tab for a user you get an error - 'Course id is incorrect'.

      I found the problem to be the incorrect usage of optional_param() in mod/forum/user.php

      namely, starting at line 7:
      $course = optional_param('course', PARAM_INT);
      $id = optional_param('id', PARAM_INT);
      $user = optional_param('user', PARAM_INT);

      This is passing PARAM_INT as the default return, instead of as the type.
      Should be:
      $course = optional_param('course', NULL, PARAM_INT);
      $id = optional_param('id', NULL, PARAM_INT);
      $user = optional_param('user', NULL, PARAM_INT);

            poltawski Dan Poltawski
            emerrill Eric Merrill
            Votes:
            0 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.