File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1260,7 +1260,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
1260
1260
const mbfl_encoding * * list ;
1261
1261
size_t size ;
1262
1262
1263
- if (!new_value ) {
1263
+ if (!new_value || ! new_value_length ) {
1264
1264
if (MBSTRG (http_input_list )) {
1265
1265
pefree (MBSTRG (http_input_list ), 1 );
1266
1266
}
@@ -1328,7 +1328,7 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v
1328
1328
{
1329
1329
const mbfl_encoding * encoding ;
1330
1330
1331
- if (!new_value || new_value_length == 0 || !(encoding = mbfl_name2encoding (new_value ))) {
1331
+ if (!new_value || ! new_value_length || !(encoding = mbfl_name2encoding (new_value ))) {
1332
1332
/* falls back to UTF-8 if an unknown encoding name is given */
1333
1333
encoding = mbfl_no2encoding (mbfl_no_encoding_utf8 );
1334
1334
}
@@ -1361,7 +1361,7 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
1361
1361
}
1362
1362
1363
1363
if (stage & (PHP_INI_STAGE_STARTUP | PHP_INI_STAGE_SHUTDOWN | PHP_INI_STAGE_RUNTIME )) {
1364
- if (new_value_length ) {
1364
+ if (new_value && new_value_length ) {
1365
1365
return _php_mb_ini_mbstring_internal_encoding_set (new_value , new_value_length TSRMLS_CC );
1366
1366
} else {
1367
1367
return _php_mb_ini_mbstring_internal_encoding_set (get_internal_encoding (TSRMLS_C ), strlen (get_internal_encoding (TSRMLS_C ))+ 1 TSRMLS_CC );
You can’t perform that action at this time.
0 commit comments