- make get() return false if the SSH_FXP_READ packet failed

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@150 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2011-03-31 10:49:33 +00:00
parent 73f0886e87
commit 9660724387

View File

@ -1230,6 +1230,11 @@ class Net_SFTP extends Net_SSH2 {
return false;
}
// check the status from the NET_SFTP_STATUS case in the above switch after the file has been closed
if ($status != NET_SFTP_STATUS_OK) {
return false'
}
extract(unpack('Nstatus', $this->_string_shift($response, 4)));
if ($status != NET_SFTP_STATUS_OK) {
extract(unpack('Nlength', $this->_string_shift($response, 4)));