]> granicus.if.org Git - php/commitdiff
Fix #51532 (Invalid prototype for SplFileInfo::fscanf)
authorEtienne Kneuss <colder@php.net>
Sun, 25 Apr 2010 05:18:42 +0000 (05:18 +0000)
committerEtienne Kneuss <colder@php.net>
Sun, 25 Apr 2010 05:18:42 +0000 (05:18 +0000)
ext/spl/spl_directory.c
ext/spl/tests/bug51532.phpt [new file with mode: 0644]

index 5721f06f90e28ccde52cd851d847c5f9ae687cae..3b473742066f77e4d1d48ba0e65c38661a6a5efc 100755 (executable)
@@ -2567,9 +2567,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetss, 0, 0, 0)
        ZEND_ARG_INFO(0, allowable_tags)
 ZEND_END_ARG_INFO()
 
-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()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fwrite, 0, 0, 1) 
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===