mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Handle empty fread return correctly which resolves zero-byte file issues
This commit is contained in:
parent
020bcdab29
commit
1eda62913a
@ -1956,7 +1956,7 @@ class Net_SFTP extends Net_SSH2
|
||||
}
|
||||
} else {
|
||||
$temp = isset($fp) ? fread($fp, $sftp_packet_size) : substr($data, $sent, $sftp_packet_size);
|
||||
if ($temp === false) {
|
||||
if ($temp === false || $temp === '') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user