Skip to content

Commit 379d9a1

Browse files
author
Yasuo Ohgaki
committed
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: Fix Bug #72992 mbstring.internal_encoding doesn't inherit default_charset
2 parents af3031d + 8bbd095 commit 379d9a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mbstring/mbstring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input)
12501250
const mbfl_encoding **list;
12511251
size_t size;
12521252

1253-
if (!new_value) {
1253+
if (!new_value || !ZSTR_VAL(new_value)) {
12541254
if (MBSTRG(http_input_list)) {
12551255
pefree(MBSTRG(http_input_list), 1);
12561256
}
@@ -1318,7 +1318,7 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v
13181318
{
13191319
const mbfl_encoding *encoding;
13201320

1321-
if (!new_value || new_value_length == 0 || !(encoding = mbfl_name2encoding(new_value))) {
1321+
if (!new_value || !new_value_length || !(encoding = mbfl_name2encoding(new_value))) {
13221322
/* falls back to UTF-8 if an unknown encoding name is given */
13231323
encoding = mbfl_no2encoding(mbfl_no_encoding_utf8);
13241324
}

0 commit comments

Comments
 (0)