mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +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 {
|
} else {
|
||||||
$temp = isset($fp) ? fread($fp, $sftp_packet_size) : substr($data, $sent, $sftp_packet_size);
|
$temp = isset($fp) ? fread($fp, $sftp_packet_size) : substr($data, $sent, $sftp_packet_size);
|
||||||
if ($temp === false) {
|
if ($temp === false || $temp === '') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user