Skip to content

Commit 6fa4286

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Do not allow zend.script_encoding to be set to 'pass'
2 parents ec00441 + 1e92d47 commit 6fa4286

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Don't segfault when zend.script_encoding=pass
3+
--EXTENSIONS--
4+
mbstring
5+
--INI--
6+
zend.multibyte=1
7+
zend.script_encoding=pass
8+
internal_encoding=UTF-8
9+
--FILE--
10+
<?php
11+
print "Done!\n";
12+
?>
13+
--EXPECT--
14+
Warning: PHP Startup: INI setting contains invalid encoding "pass" in Unknown on line 0
15+
Done!

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static zend_result php_mb_zend_encoding_list_parser(const char *encoding_list, s
478478
return php_mb_parse_encoding_list(
479479
encoding_list, encoding_list_len,
480480
(const mbfl_encoding ***)return_list, return_size,
481-
persistent, /* arg_num */ 0, /* allow_pass_encoding */ 1);
481+
persistent, /* arg_num */ 0, /* allow_pass_encoding */ 0);
482482
}
483483

484484
static const zend_encoding *php_mb_zend_internal_encoding_getter(void)

0 commit comments

Comments
 (0)