summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)