move valid check to beginning of loop#3
Conversation
|
This fixes an issue I'm having trying to use |
|
Superseded by #18 — same Root cause
Why a plain last-line CSV never failed in testsForeach only calls What does hit it
Please close this PR in favor of #18 once that lands. Thanks for the original diagnosis — the loop change was correct. |
Supersedes #3 with regression tests.
|
Closed as superseded by #18 (merged). |
I'm seeing an issue with a CSV I have where this line
https://github.com/portphp/csv/blob/master/src/CsvReader.php#L116
is coming back as false on the last line.
Switching the do while to a while loop fixes this, but I can't work out why it's happening or replicate it in a test.
Anyway, it doesn't break any existing tests.