diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 5f59ed34..600ace07 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2721,6 +2721,8 @@ class SFTP extends SSH2 */ protected function parseAttributes(string &$response): array { + $attr = []; + if ($this->version >= 4) { [$flags, $attr['type']] = Strings::unpackSSH2('NC', $response); } else {