Browse Source

add 3rd parameter to arg info for splfileobject fgetcsv/setcsvcontrol (bug #60201)

pull/7/head
Peter Cowburn 14 years ago
parent
commit
ac8ece2718
  1. 1
      ext/spl/spl_directory.c
  2. 30
      ext/spl/tests/bug60201.phpt

1
ext/spl/spl_directory.c

@ -2877,6 +2877,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0)
ZEND_ARG_INFO(0, delimiter)
ZEND_ARG_INFO(0, enclosure)
ZEND_ARG_INFO(0, escape)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fputcsv, 0, 0, 1)

30
ext/spl/tests/bug60201.phpt

@ -0,0 +1,30 @@
--TEST--
Bug #60201 (SplFileObject::setCsvControl does not expose third argument via Reflection)
--FILE--
<?php
$method = new ReflectionMethod('SplFileObject', 'setCsvControl');
$params = $method->getParameters();
var_dump($params);
?>
===DONE===
--EXPECTF--
array(3) {
[0]=>
&object(ReflectionParameter)#%d (1) {
["name"]=>
string(9) "delimiter"
}
[1]=>
&object(ReflectionParameter)#%d (1) {
["name"]=>
string(9) "enclosure"
}
[2]=>
&object(ReflectionParameter)#%d (1) {
["name"]=>
string(6) "escape"
}
}
===DONE===
Loading…
Cancel
Save