com php-src: Fix bug #69532: Zend/tests/bug69532.phpt Zend/zend_compile.c
| From: | Nikita Popov | Date: | Sat, 25 Apr 2015 16:47:26 +0000 |
| Subject: | com php-src: Fix bug #69532: Zend/tests/bug69532.phpt Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86481@lists.php.net to get a copy of this message | ||
Commit: 75b4fa079f1c13188895bfbe47dc561e17c59382
Author: Nikita Popov <nikic@php.net> Sat, 25 Apr 2015 18:47:26 +0200
Parents: e0a39eecf1d176162783af37c8d2f687c6815059
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75b4fa079f1c13188895bfbe47dc561e17c59382
Log:
Fix bug #69532
Partial revert of ea2fc7f935d2767c127756647f47be8d420346ce.
Bugs:
https://bugs.php.net/69532
Changed paths:
A Zend/tests/bug69532.phpt
M Zend/zend_compile.c
Diff:
diff --git a/Zend/tests/bug69532.phpt b/Zend/tests/bug69532.phpt
new file mode 100644
index 0000000..69af53c
--- /dev/null
+++ b/Zend/tests/bug69532.phpt
@@ -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===
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 3b3eb75..65677f7 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -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++;
}
}