summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-24 13:46:04 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-24 13:46:04 +0800
commit7e7c2c062fa36efc755e7bbeadda32b7ca41ec81 (patch)
treeb2e52268395caebb15471dd52b629e05080fd820
parent8d4fc591ef03f773b1a8d820b55390937a9139fe (diff)
parentd978e92d3d92d1544f8ec1dd0e8b57b837204b16 (diff)
downloadphp-git-7e7c2c062fa36efc755e7bbeadda32b7ca41ec81.tar.gz
Merge branch 'PHP-7.0'
-rw-r--r--ext/reflection/tests/bug70960.phpt10
-rw-r--r--ext/standard/basic_functions.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/ext/reflection/tests/bug70960.phpt b/ext/reflection/tests/bug70960.phpt
new file mode 100644
index 0000000000..30885cd1fa
--- /dev/null
+++ b/ext/reflection/tests/bug70960.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
+--FILE--
+<?php
+
+$ref = new ReflectionFunction('array_unique');
+var_dump(count($ref->getParameters()));
+?>
+--EXPECT--
+int(2)
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 2ac9ce3800..5334e26439 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -452,8 +452,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1)
ZEND_ARG_INFO(0, case)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_array_unique, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unique, 0, 0, 1)
ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
+ ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2)