diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index c04fe7e6..f44c7a3a 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -980,7 +980,7 @@ class SFTP extends SSH2 uasort($contents, [&$this, 'comparator']); } - return $raw ? $contents : array_keys($contents); + return $raw ? $contents : array_map('strval', array_keys($contents)); } /**