summaryrefslogtreecommitdiff
path: root/Zend/zend_gc.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_gc.h')
-rw-r--r--Zend/zend_gc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
index a7e8b64b25..fcf9159b2e 100644
--- a/Zend/zend_gc.h
+++ b/Zend/zend_gc.h
@@ -138,9 +138,9 @@ END_EXTERN_C()
static zend_always_inline void gc_check_possible_root(zval *z TSRMLS_DC)
{
- if (Z_TYPE_P(z) == IS_OBJECT || Z_TYPE_P(z) == IS_ARRAY ||
- (Z_ISREF_P(z) &&
- (Z_TYPE_P(Z_REFVAL_P(z)) == IS_ARRAY || Z_TYPE_P(Z_REFVAL_P(z)) == IS_OBJECT))) {
+ ZVAL_DEREF(z);
+ if ((Z_TYPE_FLAGS_P(z) & IS_TYPE_COLLECTABLE) &&
+ UNEXPECTED(!Z_GC_INFO_P(z))) {
gc_possible_root(Z_COUNTED_P(z) TSRMLS_CC);
}
}