]> granicus.if.org Git - php/commitdiff
Merge fix for #51532
authorEtienne Kneuss <colder@php.net>
Tue, 27 Apr 2010 05:03:17 +0000 (05:03 +0000)
committerEtienne Kneuss <colder@php.net>
Tue, 27 Apr 2010 05:03:17 +0000 (05:03 +0000)
NEWS
ext/spl/spl_directory.c
ext/spl/tests/bug51532.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 6047b50cc91cd80171af432d1fd15a20a6a53b77..f098b56fce97f6c9d7a9cb9bca89e8462e61fb8a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ PHP                                                                        NEWS
   (Daniel Egeberg)
 - Fixed bug #51562 (query timeout in mssql can not be changed per query).
   (ejsmont dot artur at gmail dot com)
+- Fixed bug #51532 (Wrong prototype for SplFileObject::fscanf()). (Etienne)
 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
 - Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
   timezone). (Adam)
index f0646e13ba158742903155496ef30a2429d60c4f..a0a9251aa812eb79c1f0d9e6e407442939241f29 100755 (executable)
@@ -2264,9 +2264,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetss, 0, 0, 0)
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 1, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 0, 0, 1)
        ZEND_ARG_INFO(0, format)
-       ZEND_ARG_INFO(1, ...)
 ZEND_END_ARG_INFO()
 
 static
diff --git a/ext/spl/tests/bug51532.phpt b/ext/spl/tests/bug51532.phpt
new file mode 100644 (file)
index 0000000..3a0722b
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+SPL: Allow valid extension of SplFileObject::fscanf
+--FILE--
+<?php
+
+class A extends SplFileObject {
+    public function fscanf($format) {
+
+    }
+}
+?>
+===DONE===
+--EXPECT--
+===DONE===