mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 04:57:53 +00:00
Merge branch 'master' of https://github.com/phpseclib/phpseclib
This commit is contained in:
commit
1c7fb5bd67
@ -918,6 +918,9 @@ class File_ASN1 {
|
||||
}
|
||||
$value = new Math_BigInteger($value);
|
||||
$value = $value->toBytes(true);
|
||||
if (!strlen($value)) {
|
||||
$value = chr(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FILE_ASN1_TYPE_UTC_TIME:
|
||||
|
@ -1648,6 +1648,7 @@ class Net_SFTP extends Net_SSH2 {
|
||||
}
|
||||
break;
|
||||
case NET_SFTP_STATUS:
|
||||
// could, in theory, return false if !strlen($content) but we'll hold off for the time being
|
||||
$this->_logError($response);
|
||||
break 2;
|
||||
default:
|
||||
@ -1691,6 +1692,7 @@ class Net_SFTP extends Net_SSH2 {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if $content isn't set that means a file was written to
|
||||
if (isset($content)) {
|
||||
return $content;
|
||||
}
|
||||
|
@ -37,8 +37,8 @@
|
||||
/**
|
||||
* Include Net_SSH2
|
||||
*/
|
||||
if (!class_exists('Net_SSH2')) {
|
||||
require_once('../Net/SSH2.php');
|
||||
if (!class_exists('Net_SFTP')) {
|
||||
require_once('Net/SFTP.php');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -256,7 +256,7 @@ class Net_SFTP_Stream {
|
||||
//}
|
||||
|
||||
$result = $this->sftp->get($this->path, false, $this->pos, $count);
|
||||
if ($result === false) {
|
||||
if (empty($result)) {
|
||||
$this->eof = true;
|
||||
return false;
|
||||
}
|
||||
@ -659,4 +659,4 @@ class Net_SFTP_Stream {
|
||||
}
|
||||
}
|
||||
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
stream_wrapper_register('sftp', 'Net_SFTP_Stream');
|
||||
|
Loading…
Reference in New Issue
Block a user