diff options
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | Zend/zend_builtin_functions.c | 15 |
2 files changed, 20 insertions, 6 deletions
@@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more information on the process. Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always -open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN. +open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN. Fix #55371: get_magic_quotes_gpc() throws deprecation warning @@ -28,3 +28,12 @@ open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN. We do not merge pull requests directly on github. All PRs will be pulled and pushed through http://git.php.net. + + +Guidelines for contributors +=========================== +- [CODING_STANDARDS](/CODING_STANDARDS) +- [README.GIT-RULES](/README.GIT-RULES) +- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES) +- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS) + diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 1ad64e74ea..6cbe0bc687 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -461,12 +461,17 @@ ZEND_FUNCTION(func_get_args) array_init_size(return_value, arg_count); for (i=0; i<arg_count; i++) { - zval *element; + zval *element, *arg; - ALLOC_ZVAL(element); - *element = **((zval **) (p-(arg_count-i))); - zval_copy_ctor(element); - INIT_PZVAL(element); + arg = *((zval **) (p-(arg_count-i))); + if (!Z_ISREF_P(arg)) { + element = arg; + Z_ADDREF_P(element); + } else { + ALLOC_ZVAL(element); + INIT_PZVAL_COPY(element, arg); + zval_copy_ctor(element); + } zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL); } } |