@@ -1052,7 +1052,6 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
1052
1052
char * string_key ;
1053
1053
uint string_key_len ;
1054
1054
ulong num_key ;
1055
- HashPosition pos ;
1056
1055
1057
1056
/* Set up known arguments */
1058
1057
args [1 ] = & key ;
@@ -1061,15 +1060,14 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
1061
1060
Z_ADDREF_P (userdata );
1062
1061
}
1063
1062
1064
- zend_hash_internal_pointer_reset_ex (target_hash , & pos );
1065
-
1066
1063
BG (array_walk_fci ).retval_ptr_ptr = & retval_ptr ;
1067
1064
BG (array_walk_fci ).param_count = userdata ? 3 : 2 ;
1068
1065
BG (array_walk_fci ).params = args ;
1069
1066
BG (array_walk_fci ).no_separation = 0 ;
1070
-
1067
+
1071
1068
/* Iterate through hash */
1072
- while (!EG (exception ) && zend_hash_get_current_data_ex (target_hash , (void * * )& args [0 ], & pos ) == SUCCESS ) {
1069
+ zend_hash_internal_pointer_reset (target_hash );
1070
+ while (!EG (exception ) && zend_hash_get_current_data (target_hash , (void * * )& args [0 ]) == SUCCESS ) {
1073
1071
if (recursive && Z_TYPE_PP (args [0 ]) == IS_ARRAY ) {
1074
1072
HashTable * thash ;
1075
1073
zend_fcall_info orig_array_walk_fci ;
@@ -1101,7 +1099,7 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
1101
1099
MAKE_STD_ZVAL (key );
1102
1100
1103
1101
/* Set up the key */
1104
- switch (zend_hash_get_current_key_ex (target_hash , & string_key , & string_key_len , & num_key , 0 , & pos )) {
1102
+ switch (zend_hash_get_current_key_ex (target_hash , & string_key , & string_key_len , & num_key , 0 , NULL )) {
1105
1103
case HASH_KEY_IS_LONG :
1106
1104
Z_TYPE_P (key ) = IS_LONG ;
1107
1105
Z_LVAL_P (key ) = num_key ;
@@ -1129,7 +1127,7 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive
1129
1127
zval_ptr_dtor (& key );
1130
1128
key = NULL ;
1131
1129
}
1132
- zend_hash_move_forward_ex (target_hash , & pos );
1130
+ zend_hash_move_forward (target_hash );
1133
1131
}
1134
1132
1135
1133
if (userdata ) {
0 commit comments