Properly end iterating over the file once the target has been reached
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
b2072cd6fc
commit
fc2e09b667
|
@ -456,7 +456,7 @@ class View {
|
||||||
// forward file handle via chunked fread because fseek seem to have failed
|
// forward file handle via chunked fread because fseek seem to have failed
|
||||||
|
|
||||||
$end = $from + 1;
|
$end = $from + 1;
|
||||||
while (!feof($handle) && ftell($handle) < $end) {
|
while (!feof($handle) && ftell($handle) < $end && ftell($handle) !== $from) {
|
||||||
$len = $from - ftell($handle);
|
$len = $from - ftell($handle);
|
||||||
if ($len > $chunkSize) {
|
if ($len > $chunkSize) {
|
||||||
$len = $chunkSize;
|
$len = $chunkSize;
|
||||||
|
|
Loading…
Reference in New Issue