e77df85d0c2a5c92f39a9b75ea4e0d9fd6b0fa24
Buffer::nth() resolved the requested position by adding it to the first row key and indexing the rows array by that computed key. That assumes contiguous keys, but Buffer::delete() removes rows with unset() without reindexing, leaving gaps. After a deletion nth() therefore returned the wrong record (or an empty array for a valid position, or a record for an out-of-range position). Resolve the position against the record order with array_values() so nth() matches getRecords() and ResultSet::nth().
Description
My contributions to thephpleague/csv: 2 commits, 1 merged PRs
46 KiB
0 Stars
1 Watchers
0 Forks
Languages
PHP
100%