Skip to content

Commit 32a4b7c

Browse files
LamentXU123jorgsowa
andcommitted
Add suggested test case
Co-Authored-By: Jorg Adam Sowa <74921107+jorgsowa@users.noreply.github.com>
1 parent 05d61a6 commit 32a4b7c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ext/standard/tests/strings/setlocale_null_byte.phpt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ try {
2020
echo $e->getMessage(), "\n";
2121
}
2222

23+
try {
24+
var_dump(setlocale(LC_ALL, ["invalid", "C\0invalid"]));
25+
} catch (ValueError $e) {
26+
echo $e->getMessage(), "\n";
27+
}
28+
2329
try {
2430
var_dump(setlocale(LC_ALL, [], new NullByteStringable()));
2531
} catch (ValueError $e) {
@@ -29,4 +35,5 @@ try {
2935
--EXPECT--
3036
setlocale(): Argument #2 ($locales) must not contain any null bytes
3137
setlocale(): Argument #2 ($locales) must not contain any null bytes
38+
setlocale(): Argument #2 ($locales) must not contain any null bytes
3239
setlocale(): Argument #3 must not contain any null bytes

0 commit comments

Comments
 (0)