Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34311 Improve debugging when using default cleaning
  3. MDL-38801

user/files.php sets $data->returnurl without defining in form

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Forms Library, Unit tests
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      On latest master, viewing /user/files.php gives:

      Did you remember to call setType() for 'returnurl'? Defaulting to PARAM_RAW cleaning.
      line 1275 of /lib/formslib.php: call to debugging()
      line 281 of /lib/formslib.php: call to moodleform->detectMissingSetType()
      line 202 of /lib/formslib.php: call to moodleform->_process_submission()
      line 65 of /user/files.php: call to moodleform->moodleform()
      

      Line 60 of /user/files.php sets $data->returnurl, and then passes $data to the constructor for user_files_form.
      I guess that this creates a form which does not define a returnurl, and therefore returnurl has no type.

      The error may now be shown as a result of MDL-38719.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: