From ac8ece271849079bda38db054b43019ac49a4f17 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Wed, 2 Nov 2011 13:24:46 +0000 Subject: [PATCH] add 3rd parameter to arg info for splfileobject fgetcsv/setcsvcontrol (bug #60201) --- ext/spl/spl_directory.c | 1 + ext/spl/tests/bug60201.phpt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ext/spl/tests/bug60201.phpt diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index db7d6791dfe..2223c3a0008 100755 --- a/ext/spl/spl_directory.c +++ b/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) diff --git a/ext/spl/tests/bug60201.phpt b/ext/spl/tests/bug60201.phpt new file mode 100644 index 00000000000..68a5daabfd2 --- /dev/null +++ b/ext/spl/tests/bug60201.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #60201 (SplFileObject::setCsvControl does not expose third argument via Reflection) +--FILE-- +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===