mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
unittests MDL-24322 made unit tests trim the path entered by the user to stop trailing spaces causing an error
This commit is contained in:
parent
b7ff4643ae
commit
7cfa8aeef2
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ $UNITTEST = new stdClass();
|
||||||
$strtitle = get_string('unittests', 'simpletest');
|
$strtitle = get_string('unittests', 'simpletest');
|
||||||
|
|
||||||
if (!is_null($path)) {
|
if (!is_null($path)) {
|
||||||
|
//trim so user doesn't get an error if they include a space on the end of the path (ie by pasting path)
|
||||||
|
$path = trim($path);
|
||||||
|
|
||||||
// Turn off xmlstrictheaders during the unit test run.
|
// Turn off xmlstrictheaders during the unit test run.
|
||||||
$origxmlstrictheaders = !empty($CFG->xmlstrictheaders);
|
$origxmlstrictheaders = !empty($CFG->xmlstrictheaders);
|
||||||
$CFG->xmlstrictheaders = false;
|
$CFG->xmlstrictheaders = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue