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 @@ -761,7 +761,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
761
761
}
762
762
/* }}} */
763
763
764
- static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value ) {
764
+ static zend_result _php_mb_ini_mbstring_http_output_set (const char * new_value , size_t length ) {
765
765
const mbfl_encoding * encoding = php_mb_get_encoding_or_pass (new_value );
766
766
if (!encoding ) {
767
767
return FAILURE ;
@@ -780,13 +780,14 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
780
780
}
781
781
782
782
if (new_value == NULL || ZSTR_LEN (new_value ) == 0 ) {
783
+ const char * encoding = php_get_output_encoding ();
783
784
MBSTRG (http_output_set ) = 0 ;
784
- _php_mb_ini_mbstring_http_output_set (php_get_output_encoding ( ));
785
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ));
785
786
return SUCCESS ;
786
787
}
787
788
788
789
MBSTRG (http_output_set ) = 1 ;
789
- return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ));
790
+ return _php_mb_ini_mbstring_http_output_set (ZSTR_VAL (new_value ), ZSTR_LEN ( new_value ) );
790
791
}
791
792
/* }}} */
792
793
@@ -968,7 +969,7 @@ static void mbstring_internal_encoding_changed_hook(void) {
968
969
969
970
if (!MBSTRG (http_output_set )) {
970
971
const char * encoding = php_get_output_encoding ();
971
- _php_mb_ini_mbstring_http_output_set (encoding );
972
+ _php_mb_ini_mbstring_http_output_set (encoding , strlen ( encoding ) );
972
973
}
973
974
974
975
if (!MBSTRG (http_input_set )) {
You can’t perform that action at this time.
0 commit comments