History log of /PHP-8.0/ext/spl/tests/gh8121.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 1d9a1f9b 28-Feb-2022 Christoph M. Becker

Fix GH-8121: SplFileObject - seek and key with csv file inconsistent

First, we must not free the current line before we call
`spl_filesystem_file_read_csv()`, because then the `current_l

Fix GH-8121: SplFileObject - seek and key with csv file inconsistent

First, we must not free the current line before we call
`spl_filesystem_file_read_csv()`, because then the `current_line` will
not be properly updated. Since the EOF check is superfluous here, we
move that part of the code to the branch for subtypes. This issue has
been introduced by the fix for bug 75917.

Second, we only must increase the `current_line` if we're not reading
ahead. This issue has been introduced by the fix for bug 62004.

Closes GH-8138.

show more ...