Fix the command filter to rekey the array (#3796)

This commit is contained in:
Corey Worrell 2024-03-27 23:36:25 -07:00 committed by GitHub
parent 80627a6883
commit 158181312b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,12 +71,12 @@ class Rsync
if (!is_array($source)) {
$source = [$source];
}
$command = array_filter(
$command = array_values(array_filter(
array_merge(['rsync', $flags], $options, $source, [$destination]),
function (string $value) {
return $value !== '';
},
);
));
$commandString = $command[0];
for ($i = 1; $i < count($command); $i++) {