mirror of
https://github.com/php/php-src.git
synced 2026-04-29 11:13:36 +02:00
Merge branch 'master' of http://git.php.net/repository/php-src
This commit is contained in:
+18
-16
@@ -3239,18 +3239,19 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
|
||||
src = Z_ARRVAL_P(arg);
|
||||
dest = Z_ARRVAL_P(return_value);
|
||||
ZEND_HASH_FOREACH_KEY_VAL(src, idx, string_key, src_entry) {
|
||||
if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
|
||||
src_entry = Z_REFVAL_P(src_entry);
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
|
||||
src_entry = Z_REFVAL_P(src_entry);
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
} else {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
}
|
||||
if (string_key) {
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
zend_hash_add_new(dest, string_key, src_entry);
|
||||
} else {
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
zend_hash_index_add_new(dest, idx, src_entry);
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
@@ -3279,18 +3280,19 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
|
||||
src = Z_ARRVAL_P(arg);
|
||||
dest = Z_ARRVAL_P(return_value);
|
||||
ZEND_HASH_FOREACH_STR_KEY_VAL(src, string_key, src_entry) {
|
||||
if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
|
||||
src_entry = Z_REFVAL_P(src_entry);
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
|
||||
src_entry = Z_REFVAL_P(src_entry);
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
} else {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
}
|
||||
if (string_key) {
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
zend_hash_add_new(dest, string_key, src_entry);
|
||||
} else {
|
||||
if (Z_REFCOUNTED_P(src_entry)) {
|
||||
Z_ADDREF_P(src_entry);
|
||||
}
|
||||
zend_hash_next_index_insert_new(dest, src_entry);
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
Reference in New Issue
Block a user