File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -760,7 +760,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
760
760
}
761
761
/* }}} */
762
762
763
- static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value ) {
763
+ static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value , size_t length ) {
764
764
const mbfl_encoding * encoding = php_mb_get_encoding_or_pass (new_value );
765
765
if (!encoding ) {
766
766
return FAILURE ;
@@ -779,13 +779,14 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
779
779
}
780
780
781
781
if (new_value == NULL || ZSTR_LEN (new_value ) == 0 ) {
782
+ const char * encoding = php_get_output_encoding ();
782
783
MBSTRG (http_output_set ) = 0 ;
783
- _php_mb_ini_mbstring_http_output_set (php_get_output_encoding ( ));
784
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ));
784
785
return SUCCESS ;
785
786
}
786
787
787
788
MBSTRG (http_output_set ) = 1 ;
788
- return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ));
789
+ return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ), ZSTR_LEN ( new_value ) );
789
790
}
790
791
/* }}} */
791
792
@@ -966,7 +967,7 @@ static void mbstring_internal_encoding_changed_hook(void) {
966
967
967
968
if (!MBSTRG (http_output_set )) {
968
969
const char * encoding = php_get_output_encoding ();
969
- _php_mb_ini_mbstring_http_output_set (encoding );
970
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ) );
970
971
}
971
972
972
973
if (!MBSTRG (http_input_set )) {
You can’t perform that action at this time.
0 commit comments