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

debugging error in error logs when enrolling users using the new 3.4 UI

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4
    • 3.4
    • Enrolments
    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-60506-master
    • Hide
      1. Log in as admin
      2. Go to Site administration > Users > Accounts > Cohorts
      3. Create 2 empty cohorts, no need to attribute users to it.
      4. Go to a course and then Participants.
      5. Click Enrol users button.
      6. Select more than one user to be enrolled (at least 2).
      7. Click Enrol selected users and cohorts button.
      8. Look apache error logs usually {{ tail -100 /var/log/apache2/error.log}}.
      9. Make sure you don't see the error mentioned on the description.
      10. Now, click on Enrol users button again.
      11. This time, select just a user and select multiple cohorts (at least 2).
      12. Enrol the user and have a look on the log again.
      13. You should not see the same error, but this time for cohort list:

        [Mon Oct 23 12:52:18.805607 2017] [:error] [pid 12679] [client 127.0.0.1:55994] Debugging: Invalid array parameter detected in required_param(): cohortlist in \n* line 657 of /lib/moodlelib.php: call to debugging()\n* line 78 of /enrol/manual/ajax.php: call to optional_param()\n, referer: http://simey.per.in.moodle.com/stable_master/user/index.php?id=28
        

      Show
      Log in as admin Go to Site administration > Users > Accounts > Cohorts Create 2 empty cohorts, no need to attribute users to it. Go to a course and then Participants. Click Enrol users button. Select more than one user to be enrolled (at least 2). Click Enrol selected users and cohorts button. Look apache error logs usually {{ tail -100 /var/log/apache2/error.log}}. Make sure you don't see the error mentioned on the description. Now, click on Enrol users button again. This time, select just a user and select multiple cohorts (at least 2). Enrol the user and have a look on the log again. You should not see the same error, but this time for cohort list: [Mon Oct 23 12:52:18.805607 2017] [:error] [pid 12679] [client 127.0.0.1:55994] Debugging: Invalid array parameter detected in required_param(): cohortlist in \n* line 657 of /lib/moodlelib.php: call to debugging()\n* line 78 of /enrol/manual/ajax.php: call to optional_param()\n, referer: http://simey.per.in.moodle.com/stable_master/user/index.php?id=28

    Description

      I've found this in my error logs while testing MDL-60179:

      Debugging: Invalid array parameter detected in required_param(): userlist in #012* line 657 of /lib/moodlelib.php: call to debugging()#012* line 71 of /enrol/manual/ajax.php: call to optional_param()
      

      It should probably be using optional_param_array() instead.

      Attachments

        Issue Links

          Activity

            People

              lameze Simey Lameze
              dmonllao David Monllaó
              Ankit Agarwal Ankit Agarwal
              Andrew Lyons Andrew Lyons
              Adrian Greeve Adrian Greeve
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Nov/17