1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00

Revered func_get_args() changes, because they were not completly transparent and broke some tricky PHP code that worked because of luck before php-5.5.6 (see Bug #66107). The changes are going to be kept in PHP-5.6.

This commit is contained in:
Dmitry Stogov
2013-12-10 16:02:59 +04:00
parent a6516653b7
commit a46f644b3a
+5 -10
View File
@@ -461,17 +461,12 @@ ZEND_FUNCTION(func_get_args)
array_init_size(return_value, arg_count);
for (i=0; i<arg_count; i++) {
zval *element, *arg;
zval *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);
}
ALLOC_ZVAL(element);
*element = **((zval **) (p-(arg_count-i)));
zval_copy_ctor(element);
INIT_PZVAL(element);
zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL);
}
}