diff options
| author | Felipe Pena <felipe@php.net> | 2011-06-05 01:38:12 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2011-06-05 01:38:12 +0000 |
| commit | 0afd4bd18bef55d8bce4d0fe854a65781477029a (patch) | |
| tree | 76e20693927c808c80be78228c2cd809bfa7bb1b | |
| parent | 087a134b50fe73458a88def5f225edbd2ffa43d5 (diff) | |
| download | php-git-0afd4bd18bef55d8bce4d0fe854a65781477029a.tar.gz | |
- Possible fix for bug #54609 (Certain implementation(s) of SplFixedArray cause hard crash)
| -rw-r--r-- | ext/spl/spl_fixedarray.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 87a3a02f93..c61f06bc08 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -152,7 +152,7 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* { spl_fixedarray_object *intern = (spl_fixedarray_object*)zend_object_store_get_object(obj TSRMLS_CC); int i = 0; - if (intern->array) { + if (intern->array && !GC_G(gc_active)) { int j = zend_hash_num_elements(intern->std.properties); for (i = 0; i < intern->array->size; i++) { @@ -160,9 +160,6 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* { zend_hash_index_update(intern->std.properties, 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(intern->std.properties, i, (void *)&EG(uninitialized_zval_ptr), sizeof(zval *), NULL); Z_ADDREF_P(EG(uninitialized_zval_ptr)); } |
