1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-26 20:24:39 +01:00

Handle empty fread return correctly which resolves zero-byte file issues

This commit is contained in:
Michel Bardelmeijer 2016-08-24 10:03:44 +02:00 committed by terrafrost
parent 020bcdab29
commit 1eda62913a

View File

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