com php-src: Fix bug #74457 Wrong reflection on XMLReader::expand: NEWS ext/xmlreader/php_xmlreader.c ext/xmlreader/tests/bug7 4457.phpt

[email protected] (Joe Watkins)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    4c0e50c88ac49052c61d1f23d5797e5d00384524
Author:    Fabien Villepinte <[email protected]>         Mon, 17 Apr 2017 11:20:47 +0200
Committer: Joe Watkins <[email protected]>      Tue, 2 May 2017 06:24:46 +0100
Parents:   f50df1d0e33aaf5007670966ca067318e064df82
Branches:  PHP-7.0 PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=4c0e50c88ac49052c61d1f23d5797e5d00384524

Log:
Fix bug #74457 Wrong reflection on XMLReader::expand

Bugs:
https://bugs.php.net/74457

Changed paths:
  M  NEWS
  M  ext/xmlreader/php_xmlreader.c
  A  ext/xmlreader/tests/bug74457.phpt


Diff:
diff --git a/NEWS b/NEWS
index ec8b4f9..2a05eae 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP                                                                        NEWS
 - intl:
   . Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
 
+- xmlreader:
+  . Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
+
 11 May 2017 PHP 7.0.19
 
 - Core:
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index d2a90bd..40b7d46 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -1260,7 +1260,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlreader_XML, 0, 0, 1)
 	ZEND_ARG_INFO(0, options)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO(arginfo_xmlreader_expand, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlreader_expand, 0, 0, 0)
+	ZEND_ARG_INFO(0, basenode)
 ZEND_END_ARG_INFO()
 /* }}} */
 
diff --git a/ext/xmlreader/tests/bug74457.phpt b/ext/xmlreader/tests/bug74457.phpt
new file mode 100644
index 0000000..17ed5c5
--- /dev/null
+++ b/ext/xmlreader/tests/bug74457.phpt
@@ -0,0 +1,15 @@
+--TEST--
+XMLReader: Bug #74457 Wrong reflection on XMLReader::expand
+--SKIPIF--
+<?php if (!extension_loaded("xmlreader")) die("skip xmlreader extension not available"); ?>
+--FILE--
+<?php
+$rm = new ReflectionMethod(XMLReader::class, 'expand');
+var_dump($rm->getNumberOfParameters());
+var_dump($rm->getNumberOfRequiredParameters());
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(0)
+===DONE===
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.