diff --git a/src/Utility/Rsync.php b/src/Utility/Rsync.php index 2a985cbb6..990242ef7 100644 --- a/src/Utility/Rsync.php +++ b/src/Utility/Rsync.php @@ -71,12 +71,12 @@ public function call(Host $host, $source, string $destination, array $config = [ 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++) {