]> granicus.if.org Git - php/commitdiff
- Possible fix for bug #54609 (Certain implementation(s) of SplFixedArray cause hard...
authorFelipe Pena <felipe@php.net>
Sun, 5 Jun 2011 01:38:12 +0000 (01:38 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 5 Jun 2011 01:38:12 +0000 (01:38 +0000)
ext/spl/spl_fixedarray.c

index 34cb69cccdef093f7f9108e73fab530e50df7668..89c4130bdf6ae5125ca4b35749e420a0b56a5963 100644 (file)
@@ -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));
                        }