SFTP: fix SFTPv2 errors when logging errors

This commit is contained in:
terrafrost 2023-08-24 20:20:47 -05:00
parent 585e0e44f4
commit 0f23be3188

View File

@ -926,7 +926,7 @@ class Net_SFTP extends Net_SSH2
$error = $this->status_codes[$status]; $error = $this->status_codes[$status];
if ($this->version > 2 || strlen($response) < 4) { if ($this->version > 2) {
extract(unpack('Nlength', $this->_string_shift($response, 4))); extract(unpack('Nlength', $this->_string_shift($response, 4)));
$this->sftp_errors[] = $error . ': ' . $this->_string_shift($response, $length); $this->sftp_errors[] = $error . ': ' . $this->_string_shift($response, $length);
} else { } else {