|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch bug63682.patch for SimpleXML related Bug #63682Patch version 2012-12-04 05:41 UTC Return to Bug #63682 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: laruence@php.net
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 5514f0f..6579655 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1081,15 +1081,9 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{
zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0);
}
else if (sxe->properties) {
- if (GC_G(gc_active)) {
- return sxe->properties;
- }
zend_hash_clean(sxe->properties);
rv = sxe->properties;
} else {
- if (GC_G(gc_active)) {
- return NULL;
- }
ALLOC_HASHTABLE(rv);
zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0);
sxe->properties = rv;
@@ -1201,6 +1195,20 @@ next_iter:
}
/* }}} */
+static HashTable * sxe_get_gc(zval *object, zval ***table, int *n TSRMLS_DC) /* {{{ */ {
+ php_sxe_object *sxe;
+ sxe = php_sxe_fetch_object(object TSRMLS_CC);
+
+ *table = NULL;
+ *n = 0;
+ if (sxe->properties) {
+ return sxe->properties;
+ } else {
+ return NULL;
+ }
+}
+/* }}} */
+
static HashTable * sxe_get_properties(zval *object TSRMLS_DC) /* {{{ */
{
return sxe_get_prop_hash(object, 0 TSRMLS_CC);
@@ -1966,7 +1974,9 @@ static zend_object_handlers sxe_object_handlers = { /* {{{ */
sxe_objects_compare,
sxe_object_cast,
sxe_count_elements,
- sxe_get_debug_info
+ sxe_get_debug_info,
+ NULL,
+ sxe_get_gc
};
/* }}} */
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |