salathe                                  Wed, 02 Nov 2011 13:24:46 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=318686

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

Bug: https://bugs.php.net/60201 (Assigned) SplFileObject::setCsvControl does 
not expose third argument via Reflection
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c
    A   php/php-src/branches/PHP_5_4/ext/spl/tests/bug60201.phpt
    U   php/php-src/trunk/ext/spl/spl_directory.c
    A   php/php-src/trunk/ext/spl/tests/bug60201.phpt

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS   2011-11-02 11:58:31 UTC (rev 318685)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-11-02 13:24:46 UTC (rev 318686)
@@ -26,6 +26,8 @@
   . 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:

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c        2011-11-02 
11:58:31 UTC (rev 318685)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_directory.c        2011-11-02 
13:24:46 UTC (rev 318686)
@@ -2877,6 +2877,7 @@
 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)

Added: php/php-src/branches/PHP_5_4/ext/spl/tests/bug60201.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/spl/tests/bug60201.phpt                    
        (rev 0)
+++ php/php-src/branches/PHP_5_4/ext/spl/tests/bug60201.phpt    2011-11-02 
13:24:46 UTC (rev 318686)
@@ -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===

Modified: php/php-src/trunk/ext/spl/spl_directory.c
===================================================================
--- php/php-src/trunk/ext/spl/spl_directory.c   2011-11-02 11:58:31 UTC (rev 
318685)
+++ php/php-src/trunk/ext/spl/spl_directory.c   2011-11-02 13:24:46 UTC (rev 
318686)
@@ -2877,6 +2877,7 @@
 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)

Added: php/php-src/trunk/ext/spl/tests/bug60201.phpt
===================================================================
--- php/php-src/trunk/ext/spl/tests/bug60201.phpt                               
(rev 0)
+++ php/php-src/trunk/ext/spl/tests/bug60201.phpt       2011-11-02 13:24:46 UTC 
(rev 318686)
@@ -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===

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to