Merge pull request #25804 from nextcloud/bugfix/noid/fread-0
Do not attempt to read 0 bytes when manually iterating over a non-seekable file
This commit is contained in:
commit
91f260fe29
|
@ -456,7 +456,7 @@ class View {
|
|||
// forward file handle via chunked fread because fseek seem to have failed
|
||||
|
||||
$end = $from + 1;
|
||||
while (!feof($handle) && ftell($handle) < $end) {
|
||||
while (!feof($handle) && ftell($handle) < $end && ftell($handle) !== $from) {
|
||||
$len = $from - ftell($handle);
|
||||
if ($len > $chunkSize) {
|
||||
$len = $chunkSize;
|
||||
|
|
Loading…
Reference in New Issue