]> granicus.if.org Git - php/commitdiff
Fix bug #69532
authorNikita Popov <nikic@php.net>
Sat, 25 Apr 2015 16:47:26 +0000 (18:47 +0200)
committerNikita Popov <nikic@php.net>
Sat, 25 Apr 2015 16:47:26 +0000 (18:47 +0200)
Partial revert of ea2fc7f935d2767c127756647f47be8d420346ce.

Zend/tests/bug69532.phpt [new file with mode: 0644]
Zend/zend_compile.c

diff --git a/Zend/tests/bug69532.phpt b/Zend/tests/bug69532.phpt
new file mode 100644 (file)
index 0000000..69af53c
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Bug #69532: array_multisort is chocking when using it's own constants
+--FILE--
+<?php
+
+namespace Foo;
+
+$origins = array();
+$profiles = array();
+$all_files = array();
+
+array_multisort($origins, SORT_ASC, $profiles, SORT_ASC, $all_files);
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
index 3b3eb7573f48df655217567f1ceb673235fcc7e4..65677f7d4791579e78319353be4083308b88d34f 100644 (file)
@@ -4123,8 +4123,9 @@ ZEND_API void zend_set_function_arg_flags(zend_function *func) /* {{{ */
                        i++;
                }
                if (UNEXPECTED(func->common.fn_flags & ZEND_ACC_VARIADIC && func->common.arg_info[i].pass_by_reference)) {
+                       uint32_t pass_by_reference = func->common.arg_info[i].pass_by_reference;
                        while (i < MAX_ARG_FLAG_NUM) {
-                               ZEND_SET_ARG_FLAG(func, i + 1, 1);
+                               ZEND_SET_ARG_FLAG(func, i + 1, pass_by_reference);
                                i++;
                        }
                }