Skip to content

Commit

Permalink
SFTP: fix SFTPv2 errors when logging errors
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Aug 25, 2023
1 parent 585e0e4 commit 0f23be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpseclib/Net/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ function _logError($response, $status = -1)

$error = $this->status_codes[$status];

if ($this->version > 2 || strlen($response) < 4) {
if ($this->version > 2) {
extract(unpack('Nlength', $this->_string_shift($response, 4)));
$this->sftp_errors[] = $error . ': ' . $this->_string_shift($response, $length);
} else {
Expand Down

1 comment on commit 0f23be3

@terrafrost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1933

Please sign in to comment.