summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-06-16 17:37:15 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-06-16 17:37:15 +0000
commit11cb016d391570c8aa0b2986b8242c14f9bd344a (patch)
treeec5b7d02fa243ac34b9aed6a857defe16dbb2086
parent327e5834d56ea62e31c09077358f1290a3fbd630 (diff)
downloadphp-git-11cb016d391570c8aa0b2986b8242c14f9bd344a.tar.gz
MFH: Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive())
-rw-r--r--ext/standard/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 64c0ad84a2..597daf2508 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2001,7 +2001,7 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS
if (recursive &&
zend_hash_find(dest, string_key, string_key_len,
(void **)&dest_entry) == SUCCESS) {
- if (*src_entry == *dest_entry) {
+ if (*src_entry == *dest_entry && ((*dest_entry)->refcount % 2)) {
zend_error(E_WARNING, "%s(): recursion detected",
get_active_function_name(TSRMLS_C));
return 0;