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

URLs generated by getExternalTestFileUrl() now contain double forward slash

XMLWordPrintable

      Calling the test file URL helper as we'd normally do, with a leading slash before the test file, e.g.

      $this->getExternalTestFileUrl('/ims_cartridge_basic_lti_link.xml')
      

      results in the URL:
      http://download.moodle.org/unittest//ims_cartridge_basic_lti_link.xml
      which has two slashes now. This is a change.

      This is fine in a browser, but if you're using this call inside a web service test to get value that will eventually be validated as type PARAM_URL, it's going to fail validation because of that double forward slash. clean_param doesn't like that. I only notice this in the LTI feature branch; core doesn't appear to have had cases like this, otherwise we'd have already noticed in ci.

      Calling it without the leading slash doesn't help either. You'll always get the double slash.

      Thanks to dobedobedoh for confirming the source of the problem is MDL-81521.

            dobedobedoh Andrew Lyons
            jaked Jake Dallimore
            Jake Dallimore Jake Dallimore
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m

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