Permalink
Browse files

add 3rd parameter to arg info for splfileobject fgetcsv/setcsvcontrol…

… (bug #60201)
  • Loading branch information...
1 parent c1d520d commit 9b86852d6ee2976b68e81f8fb8e1b44de3d7c631 @salathe salathe committed Nov 2, 2011
Showing with 33 additions and 0 deletions.
  1. +2 −0 NEWS
  2. +1 −0 ext/spl/spl_directory.c
  3. +30 −0 ext/spl/tests/bug60201.phpt
View
2 NEWS
@@ -26,6 +26,8 @@ PHP NEWS
. Reverted changes that required constructor overrides to invoke the parent
constructor in several SPL classes and applied 5.3 fixes instead.
Related bugs: #54384, #55175 and #55300.
+ . Fixed bug #60201 (SplFileObject::setCsvControl does not expose third
+ argument via Reflection). (Peter)
20 Oct 2011, PHP 5.4.0 beta2
- General improvements:
View
@@ -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)
@@ -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===

0 comments on commit 9b86852

Please sign in to comment.