summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Kneuss <colder@php.net>2010-04-25 05:18:42 +0000
committerEtienne Kneuss <colder@php.net>2010-04-25 05:18:42 +0000
commitd8c8cb4cca06a669f1e9b67cf7235fd392baba06 (patch)
tree1113ec0bdbbe57966fa43f43e164a43956f5a414
parentf95818634c82618b9b365172fc26bd26a2bae038 (diff)
downloadphp-git-d8c8cb4cca06a669f1e9b67cf7235fd392baba06.tar.gz
Fix #51532 (Invalid prototype for SplFileInfo::fscanf)
-rwxr-xr-xext/spl/spl_directory.c3
-rw-r--r--ext/spl/tests/bug51532.phpt14
2 files changed, 15 insertions, 2 deletions
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 5721f06f90..3b47374206 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -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
index 0000000000..3a0722b2af
--- /dev/null
+++ b/ext/spl/tests/bug51532.phpt
@@ -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===