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 @@ -757,7 +757,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
757
757
}
758
758
/* }}} */
759
759
760
- static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value ) {
760
+ static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value , size_t length ) {
761
761
const mbfl_encoding * encoding = php_mb_get_encoding_or_pass (new_value );
762
762
if (!encoding ) {
763
763
return FAILURE ;
@@ -776,13 +776,14 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
776
776
}
777
777
778
778
if (new_value == NULL || ZSTR_LEN (new_value ) == 0 ) {
779
+ const char * encoding = php_get_output_encoding ();
779
780
MBSTRG (http_output_set ) = 0 ;
780
- _php_mb_ini_mbstring_http_output_set (php_get_output_encoding ( ));
781
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ));
781
782
return SUCCESS ;
782
783
}
783
784
784
785
MBSTRG (http_output_set ) = 1 ;
785
- return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ));
786
+ return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ), ZSTR_LEN ( new_value ) );
786
787
}
787
788
/* }}} */
788
789
@@ -964,7 +965,7 @@ static void mbstring_internal_encoding_changed_hook(void) {
964
965
965
966
if (!MBSTRG (http_output_set )) {
966
967
const char * encoding = php_get_output_encoding ();
967
- _php_mb_ini_mbstring_http_output_set (encoding );
968
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ) );
968
969
}
969
970
970
971
if (!MBSTRG (http_input_set )) {
You can’t perform that action at this time.
0 commit comments