summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-24 13:45:16 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-24 13:45:16 +0800
commite6b46dc2ff80e78a537155b6d5a556426c90fb59 (patch)
treeb889837e5349ad8c2a307fa081ce3b533d0e4260
parent1c72e5b29929360167cdeec93b21bb9b6ef33c57 (diff)
downloadphp-git-e6b46dc2ff80e78a537155b6d5a556426c90fb59.tar.gz
Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
-rw-r--r--NEWS4
-rw-r--r--ext/reflection/tests/bug70960.phpt10
-rw-r--r--ext/standard/basic_functions.c3
3 files changed, 16 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c294e29831..f49ea8ff3e 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ PHP NEWS
- SOAP:
. Fixed bug #70900 (SoapClient systematic out of memory error). (Dmitry)
+- Standard:
+ . Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number
+ of parameters). (Laruence)
+
26 Nov 2015, PHP 5.6.16
- Core:
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 1abe3e60ab..27da28bc2e 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -451,8 +451,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)