]> granicus.if.org Git - php/commitdiff
Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
authorXinchen Hui <laruence@gmail.com>
Tue, 24 Nov 2015 05:45:16 +0000 (13:45 +0800)
committerXinchen Hui <laruence@gmail.com>
Tue, 24 Nov 2015 05:45:16 +0000 (13:45 +0800)
NEWS
ext/reflection/tests/bug70960.phpt [new file with mode: 0644]
ext/standard/basic_functions.c

diff --git a/NEWS b/NEWS
index c294e2983142e3358d1227e8fd0ebbe2d6cb7c40..f49ea8ff3e02d984bdb80f1c8493746d25047f12 100644 (file)
--- 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 (file)
index 0000000..30885cd
--- /dev/null
@@ -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)
index 1abe3e60abbbfd96f3ccc0b891edbc5154ac73eb..27da28bc2e52441e9239cd297bb1f75defd8c72f 100644 (file)
@@ -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)