summaryrefslogtreecommitdiff
path: root/ext/spl/spl_fixedarray.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-08-08 23:56:29 (GMT)
committerFelipe Pena <felipe@php.net>2010-08-08 23:56:29 (GMT)
commit84bc1c8593861e6027488dd71de0ed7d7a4af172 (patch)
treef97b9f74d468dff45ae1309f34cddaf976f0ab68 /ext/spl/spl_fixedarray.c
parent30470999fe43b495907dbf1c6748778d44e1337f (diff)
downloadphp-84bc1c8593861e6027488dd71de0ed7d7a4af172.tar.gz
- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes)
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r--ext/spl/spl_fixedarray.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 73f5fcb..4389d50 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -159,6 +159,9 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* {
zend_hash_index_update(ht, i, (void *)&intern->array->elements[i], sizeof(zval *), NULL);
Z_ADDREF_P(intern->array->elements[i]);
} else {
+ if (GC_G(gc_active)) {
+ return NULL;
+ }
zend_hash_index_update(ht, i, (void *)&EG(uninitialized_zval_ptr), sizeof(zval *), NULL);
Z_ADDREF_P(EG(uninitialized_zval_ptr));
}