This commit is contained in:
terrafrost 2013-04-02 19:37:36 -05:00
commit 1c7fb5bd67
3 changed files with 9 additions and 4 deletions

View File

@ -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:

View File

@ -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;
}

View File

@ -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');