Skip to content

Commit

Permalink
Don't quote commands on Windows anymore (#210)
Browse files Browse the repository at this point in the history
With PHP 8.0.0-RC2 the command handling has been simplified and improved.
Quoting can be removed since it is now handled properly internally.

See also php/php-src@9ca449e

This fixes #210 and closes #213
  • Loading branch information
michael-o committed Jan 30, 2024
1 parent b1a02c6 commit cd5c5f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/command.php
Expand Up @@ -122,12 +122,10 @@ function runCommand($cmd, $mayReturnNothing = false, &$errorIf = 'NOT_USED') {
$error = '';
$opts = null;

// https://github.com/websvnphp/websvn/issues/75
// https://github.com/websvnphp/websvn/issues/78
if ($config->serverIsWindows) {
if (!strpos($cmd, '>') && !strpos($cmd, '|')) {
$opts = array('bypass_shell' => true);
} else {
} else if (PHP_MAJOR_VERSION < 8) {
$cmd = '"'.$cmd.'"';
}
}
Expand Down

0 comments on commit cd5c5f2

Please sign in to comment.