More correct pseudo-fix

# This is not really a fix. This thing is still broken. I will think on
# how to really fix it. Any suggestion is *welcome*.
This commit is contained in:
Stanislav Malyshev 2001-07-11 11:45:05 +00:00
parent 66d94bc655
commit adc98200d6

View file

@ -324,7 +324,7 @@ PHPAPI void php_var_serialize(zval *buf, zval **struc, HashTable *var_hash)
if ((i = zend_hash_get_current_key_ex(myht, &key, NULL, &index, 0, &pos)) == HASH_KEY_NON_EXISTANT) {
break;
}
if (zend_hash_get_current_data_ex(myht, (void **) (&data), &pos) != SUCCESS || !data /* || ((*data) == (*struc)) */) {
if (zend_hash_get_current_data_ex(myht, (void **) (&data), &pos) != SUCCESS || !data || data == struc) {
continue;
}
@ -342,7 +342,6 @@ PHPAPI void php_var_serialize(zval *buf, zval **struc, HashTable *var_hash)
FREE_ZVAL(d);
break;
}
if (data == struc) return;
php_var_serialize(buf, data, var_hash);
}
}