@@ -794,18 +794,19 @@ static long make_req_streams(php_so_object *soo, const char *url, const smart_st
794794 }
795795
796796 if (request_headers ) {
797+ HashPosition pos ;
797798 zval * cur_val , zheaders ;
798799 zend_string * cur_key ;
799800 ulong num_key ;
800801 smart_string sheaders = {0 };
801802 int first = 1 ;
802803
803- for (zend_hash_internal_pointer_reset (request_headers );
804- (cur_val = zend_hash_get_current_data (request_headers )) != NULL ;
805- zend_hash_move_forward (request_headers )) {
804+ for (zend_hash_internal_pointer_reset_ex (request_headers , & pos );
805+ (cur_val = zend_hash_get_current_data_ex (request_headers , & pos )) != NULL ;
806+ zend_hash_move_forward_ex (request_headers , & pos )) {
806807 /* check if a string based key is used */
807808 smart_string sheaderline = {0 };
808- switch (zend_hash_get_current_key (request_headers , & cur_key , & num_key )) {
809+ switch (zend_hash_get_current_key_ex (request_headers , & cur_key , & num_key , & pos )) {
809810 case HASH_KEY_IS_STRING :
810811 smart_string_appendl (& sheaderline , ZSTR_VAL (cur_key ), ZSTR_LEN (cur_key ));
811812 break ;
@@ -876,16 +877,17 @@ static long make_req_streams(php_so_object *soo, const char *url, const smart_st
876877
877878 if (Z_TYPE (s -> wrapperdata ) != IS_UNDEF ) {
878879 zval * tmp ;
880+ HashPosition pos ;
879881
880- zend_hash_internal_pointer_reset (Z_ARRVAL (s -> wrapperdata ));
881- while ((tmp = zend_hash_get_current_data (Z_ARRVAL (s -> wrapperdata ))) != NULL ) {
882+ zend_hash_internal_pointer_reset_ex (Z_ARRVAL (s -> wrapperdata ), & pos );
883+ while ((tmp = zend_hash_get_current_data_ex (Z_ARRVAL (s -> wrapperdata ), & pos )) != NULL ) {
882884 smart_string_appendl (& soo -> headers_in , Z_STRVAL_P (tmp ), Z_STRLEN_P (tmp ));
883885 smart_string_appends (& soo -> headers_in , "\r\n" );
884886 HTTP_RESPONSE_CODE (tmp );
885887 HTTP_RESPONSE_LOCATION (tmp );
886888 HTTP_RESPONSE_CAAS (tmp , "Content-Type: " , "content_type" );
887889 HTTP_RESPONSE_CAAD (tmp , "Content-Length: " , "download_content_length" );
888- zend_hash_move_forward (Z_ARRVAL (s -> wrapperdata ));
890+ zend_hash_move_forward_ex (Z_ARRVAL (s -> wrapperdata ), & pos );
889891 }
890892 if (HTTP_IS_REDIRECT (response_code ) && soo -> last_location_header ) {
891893 CAAS ("redirect_url" , soo -> last_location_header );
0 commit comments