Skip to content

Commit efdf2af

Browse files
authored
fix: cast port to string before adding to options
This function is hinted as a `string[]` but `Host::getPort()` can return an int or string. This causes issues in the `rsync_rsh` function has it passes the values of the array to functions that require a string to be used.
1 parent 15242e4 commit efdf2af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Host/Host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public function connectionOptions(): array
278278
}
279279
}
280280
if ($this->has('port')) {
281-
$options = array_merge($options, ['-p', $this->getPort()]);
281+
$options = array_merge($options, ['-p', (string) $this->getPort()]);
282282
}
283283
if ($this->has('config_file')) {
284284
$options = array_merge($options, ['-F', parse_home_dir($this->getConfigFile())]);

0 commit comments

Comments
 (0)