mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-16 03:22:17 +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 = new Math_BigInteger($value);
|
||||||
$value = $value->toBytes(true);
|
$value = $value->toBytes(true);
|
||||||
|
if (!strlen($value)) {
|
||||||
|
$value = chr(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FILE_ASN1_TYPE_UTC_TIME:
|
case FILE_ASN1_TYPE_UTC_TIME:
|
||||||
|
@ -1648,6 +1648,7 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NET_SFTP_STATUS:
|
case NET_SFTP_STATUS:
|
||||||
|
// could, in theory, return false if !strlen($content) but we'll hold off for the time being
|
||||||
$this->_logError($response);
|
$this->_logError($response);
|
||||||
break 2;
|
break 2;
|
||||||
default:
|
default:
|
||||||
@ -1691,6 +1692,7 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if $content isn't set that means a file was written to
|
||||||
if (isset($content)) {
|
if (isset($content)) {
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
/**
|
/**
|
||||||
* Include Net_SSH2
|
* Include Net_SSH2
|
||||||
*/
|
*/
|
||||||
if (!class_exists('Net_SSH2')) {
|
if (!class_exists('Net_SFTP')) {
|
||||||
require_once('../Net/SSH2.php');
|
require_once('Net/SFTP.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,7 +256,7 @@ class Net_SFTP_Stream {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
$result = $this->sftp->get($this->path, false, $this->pos, $count);
|
$result = $this->sftp->get($this->path, false, $this->pos, $count);
|
||||||
if ($result === false) {
|
if (empty($result)) {
|
||||||
$this->eof = true;
|
$this->eof = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user