mirror of
https://github.com/php/php-src.git
synced 2025-01-13 06:24:18 +08:00
Fixed clobbering of the source array, when merging complex
multi-dimensional arrays. Bug reported by Lukas Smith.
This commit is contained in:
parent
f46b5641b7
commit
31a3c87159
@ -2168,6 +2168,8 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS
|
||||
return 0;
|
||||
}
|
||||
SEPARATE_ZVAL(dest_entry);
|
||||
SEPARATE_ZVAL(src_entry);
|
||||
|
||||
convert_to_array_ex(dest_entry);
|
||||
convert_to_array_ex(src_entry);
|
||||
if (!php_array_merge(Z_ARRVAL_PP(dest_entry),
|
||||
|
Loading…
Reference in New Issue
Block a user