Browse Source

Got rid of infinite recursion when serializing $GLOBALS[].


			
			
				PHP-4.0.5
			
			
		
Andrei Zmievski 27 years ago
parent
commit
0a09f95dd7
  1. 8
      ext/wddx/wddx.c

8
ext/wddx/wddx.c

@ -415,7 +415,11 @@ static void php_wddx_serialize_hash(wddx_packet *packet, zval *var)
}
}
while(zend_hash_get_current_data(target_hash, (void**)&ent) == SUCCESS) {
for (;zend_hash_get_current_data(target_hash, (void**)&ent) == SUCCESS;
zend_hash_move_forward(target_hash)) {
if (*ent == var)
continue;
if (var->type == IS_OBJECT || hash_type == HASH_KEY_IS_STRING) {
ent_type = zend_hash_get_current_key(target_hash, &key, &idx);
@ -428,8 +432,6 @@ static void php_wddx_serialize_hash(wddx_packet *packet, zval *var)
}
} else
php_wddx_serialize_var(packet, *ent, NULL);
zend_hash_move_forward(target_hash);
}
if (var->type == IS_OBJECT || hash_type == HASH_KEY_IS_STRING) {

Loading…
Cancel
Save