Skip to content

Commit

Permalink
Merge branch 'wip-mdl-55986-fix' of git://github.com/rajeshtaneja/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Oct 5, 2016
2 parents c7fc66f + b9b4741 commit d905fc3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions admin/tool/behat/cli/init.php
Expand Up @@ -91,12 +91,20 @@
// If parallel run then use utilparallel.
if ($options['parallel'] && $options['parallel'] > 1) {
$utilfile = 'util.php';
}
// Sanitize all input options, so they can be passed to util.
foreach ($options as $option => $value) {
if ($value) {
$commandoptions .= " --$option='$value'";
}
}
} else {
// Only sanitize options for single run.
$cmdoptionsforsinglerun = array('run-with-theme');

// Sanitize input options, so they can be passed to util.
foreach ($options as $option => $value) {
if ($value) {
$commandoptions .= " --$option='$value'";
foreach ($cmdoptionsforsinglerun as $option) {
if (!empty($options[$option])) {
$commandoptions .= " --$option='$options[$option]'";
}
}
}

Expand Down

0 comments on commit d905fc3

Please sign in to comment.