summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-03-12 19:18:42 +0000
committerFelipe Pena <felipe@php.net>2008-03-12 19:18:42 +0000
commiteea093b47c52297d50764c8a952ca9ed899d6bd7 (patch)
tree82ef428592a767a6c81d412900a512e3871fc2ee /ext/standard/array.c
parentc94d9b0c126d09e4d0fe563442a6783cd0f671e2 (diff)
downloadphp-git-eea093b47c52297d50764c8a952ca9ed899d6bd7.tar.gz
MFB: Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" comes again...)
Diffstat (limited to 'ext/standard/array.c')
-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 9d926ecd1e..6b4db94d8b 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2210,7 +2210,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) {
HashTable *thash = HASH_OF(*dest_entry);
- if ((thash && thash->nApplyCount > 1) || (*src_entry == *dest_entry && (Z_REFCOUNT_PP(dest_entry) % 2))) {
+ if ((thash && thash->nApplyCount > 1) || (*src_entry == *dest_entry && Z_ISREF_PP(dest_entry) && (Z_REFCOUNT_PP(dest_entry) % 2))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
return 0;
}