Skip to content

Commit 2b7a995

Browse files
committed
Add test case for bug #46569
1 parent 37d5610 commit 2b7a995

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

ext/spl/tests/bug46569.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
first,line
2+
second,line
3+
third,line
4+
fourth,line
5+
fifth,line

ext/spl/tests/bug46569.phpt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Bug #46569 (SplFileObject: fgetcsv after seek returns wrong line)
3+
--FILE--
4+
<?php
5+
$file = new SplFileObject(__DIR__ . '/bug46569.csv');
6+
$file->seek(1);
7+
print_r($file->fgetcsv());
8+
?>
9+
--EXPECT--
10+
Array
11+
(
12+
[0] => second
13+
[1] => line
14+
)

0 commit comments

Comments
 (0)