mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
As it is, `::seek(0)` sets the file pointer to the beginning of the file, but `::seek($n)` where `$n > 0` sets the file pointer to the beginning of the following line, having line `$n` already read into the line buffer. This is pretty inconsistent; we fix it by always seeking to the beginning of the line. We also add a test case for the duplicate bug #46569. Closes GH-6434.
57 B
57 B
| 1 | first | line |
|---|---|---|
| 2 | second | line |
| 3 | third | line |
| 4 | fourth | line |
| 5 | fifth | line |