Commit a087d0b3ede460d19e6f053855f099d7e44a8e65
1 parent
77f49e09
Exists in
master
and in
111 other branches
Fix bug when an uploaded file have a header greater than 100 lines
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
php/classes/FilesMgr.php
@@ -510,9 +510,9 @@ class FilesMgr extends AmdaObjectMgr | @@ -510,9 +510,9 @@ class FilesMgr extends AmdaObjectMgr | ||
510 | while (($line = trim(fgets($handle))) !== false && $i < 100) | 510 | while (($line = trim(fgets($handle))) !== false && $i < 100) |
511 | { | 511 | { |
512 | $elems = explode(" ", preg_replace('/\s+/', ' ', $line)); | 512 | $elems = explode(" ", preg_replace('/\s+/', ' ', $line)); |
513 | - $i++; | ||
514 | if (count($elems) < 2 || strpos($elems[0], '#') === 0) continue; | 513 | if (count($elems) < 2 || strpos($elems[0], '#') === 0) continue; |
515 | - | 514 | + |
515 | + $i++; | ||
516 | if (!$timeDouble) | 516 | if (!$timeDouble) |
517 | { | 517 | { |
518 | if (strlen($elems[0]) >= 16 && ($time = strtotime($elems[0]))) | 518 | if (strlen($elems[0]) >= 16 && ($time = strtotime($elems[0]))) |