From 9990547297d3a2e7a3df616ec6499309a346d6b5 Mon Sep 17 00:00:00 2001 From: Corey Worrell Date: Wed, 27 Mar 2024 16:20:01 -0700 Subject: [PATCH] Fix the command filter to rekey the array --- src/Utility/Rsync.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) {