Skip to content

Commit adc9820

Browse files
committed
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*.
1 parent 66d94bc commit adc9820

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/standard/var.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ PHPAPI void php_var_serialize(zval *buf, zval **struc, HashTable *var_hash)
324324
if ((i = zend_hash_get_current_key_ex(myht, &key, NULL, &index, 0, &pos)) == HASH_KEY_NON_EXISTANT) {
325325
break;
326326
}
327-
if (zend_hash_get_current_data_ex(myht, (void **) (&data), &pos) != SUCCESS || !data /* || ((*data) == (*struc)) */) {
327+
if (zend_hash_get_current_data_ex(myht, (void **) (&data), &pos) != SUCCESS || !data || data == struc) {
328328
continue;
329329
}
330330

@@ -342,7 +342,6 @@ PHPAPI void php_var_serialize(zval *buf, zval **struc, HashTable *var_hash)
342342
FREE_ZVAL(d);
343343
break;
344344
}
345-
if (data == struc) return;
346345
php_var_serialize(buf, data, var_hash);
347346
}
348347
}

0 commit comments

Comments
 (0)