summaryrefslogtreecommitdiff
path: root/ext/spl/spl_fixedarray.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-05 01:38:12 (GMT)
committerFelipe Pena <felipe@php.net>2011-06-05 01:38:12 (GMT)
commita2124382ac000e5a598998d97706149d96609c4d (patch)
tree86a4cdc874f486e230221fcb7e6ff1b6cbd280c9 /ext/spl/spl_fixedarray.c
parent379c32bd417f9077a962d4a60a89e2a375ef22a9 (diff)
downloadphp-a2124382ac000e5a598998d97706149d96609c4d.tar.gz
- Possible fix for bug #54609 (Certain implementation(s) of SplFixedArray cause hard crash)
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r--ext/spl/spl_fixedarray.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 34cb69c..89c4130 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -153,7 +153,7 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* {
HashTable *ht = zend_std_get_properties(obj TSRMLS_CC);
int i = 0;
- if (intern->array) {
+ if (intern->array && !GC_G(gc_active)) {
int j = zend_hash_num_elements(ht);
for (i = 0; i < intern->array->size; i++) {
@@ -161,9 +161,6 @@ 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));
}