diff options
-rw-r--r-- | Zend/tests/bug69532.phpt | 17 | ||||
-rw-r--r-- | Zend/zend_compile.c | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/Zend/tests/bug69532.phpt b/Zend/tests/bug69532.phpt new file mode 100644 index 0000000000..69af53c8fe --- /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 3b3eb7573f..65677f7d47 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++; } } |