From 758a3822bb09ac4bc13ea1fc91a578fcef05920c Mon Sep 17 00:00:00 2001 From: Fabien Villepinte Date: Tue, 11 Apr 2017 17:26:03 +0200 Subject: [PATCH] Fixed bug #74416 Wrong reflection on DOMNode::cloneNode --- ext/dom/node.c | 2 +- ext/dom/tests/bug74416.phpt | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ext/dom/tests/bug74416.phpt diff --git a/ext/dom/node.c b/ext/dom/node.c index c3a7819251660..0f8b759b0e8a3 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -49,7 +49,7 @@ ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_child_nodes, 0, 0, 0) ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 1) +ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 0) ZEND_ARG_INFO(0, deep) ZEND_END_ARG_INFO(); diff --git a/ext/dom/tests/bug74416.phpt b/ext/dom/tests/bug74416.phpt new file mode 100644 index 0000000000000..d441c0a7abf2f --- /dev/null +++ b/ext/dom/tests/bug74416.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #74416 Wrong reflection on DOMNode::cloneNode +--SKIPIF-- + +--FILE-- +getNumberOfParameters(), $rm->getNumberOfRequiredParameters()); +foreach ($rm->getParameters() as $param) { + printf("Parameter #%d %s OPTIONAL\n", $param->getPosition(), $param->isOptional() ? "IS" : "IS NOT"); +} +?> +===DONE=== +--EXPECT-- +1 +0 +Parameter #0 IS OPTIONAL +===DONE===