diff options
Diffstat (limited to 'ext/standard/array.c')
| -rw-r--r-- | ext/standard/array.c | 2 | 
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; | 
