1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

Preserve internal pointer over print_r (fix #8289)

This commit is contained in:
Stanislav Malyshev
2000-12-18 13:56:30 +00:00
parent 43adbdcc72
commit 9a135a2b29

View File

@@ -79,6 +79,7 @@ static void print_hash(HashTable *ht, int indent)
{
zval **tmp;
char *string_key;
Bucket *save_internal_pointer;
unsigned long num_key;
int i;
@@ -87,6 +88,7 @@ static void print_hash(HashTable *ht, int indent)
}
ZEND_PUTS("(\n");
indent += PRINT_ZVAL_INDENT;
save_internal_pointer = ht->pInternalPointer;
zend_hash_internal_pointer_reset(ht);
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
for (i=0; i<indent; i++) {
@@ -112,6 +114,7 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS(" ");
}
ZEND_PUTS(")\n");
ht->pInternalPointer = save_internal_pointer;
}