Skip to content

Commit 2e1ba26

Browse files
author
salathe
committed
add 3rd parameter to arg info for splfileobject fgetcsv/setcsvcontrol (bug #60201)
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@318686 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent f3fa0f3 commit 2e1ba26

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

ext/spl/spl_directory.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,7 @@ ZEND_END_ARG_INFO()
28772877
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0)
28782878
ZEND_ARG_INFO(0, delimiter)
28792879
ZEND_ARG_INFO(0, enclosure)
2880+
ZEND_ARG_INFO(0, escape)
28802881
ZEND_END_ARG_INFO()
28812882

28822883
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fputcsv, 0, 0, 1)

ext/spl/tests/bug60201.phpt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
Bug #60201 (SplFileObject::setCsvControl does not expose third argument via Reflection)
3+
--FILE--
4+
<?php
5+
6+
$method = new ReflectionMethod('SplFileObject', 'setCsvControl');
7+
$params = $method->getParameters();
8+
var_dump($params);
9+
10+
?>
11+
===DONE===
12+
--EXPECTF--
13+
array(3) {
14+
[0]=>
15+
&object(ReflectionParameter)#%d (1) {
16+
["name"]=>
17+
string(9) "delimiter"
18+
}
19+
[1]=>
20+
&object(ReflectionParameter)#%d (1) {
21+
["name"]=>
22+
string(9) "enclosure"
23+
}
24+
[2]=>
25+
&object(ReflectionParameter)#%d (1) {
26+
["name"]=>
27+
string(6) "escape"
28+
}
29+
}
30+
===DONE===

0 commit comments

Comments
 (0)