We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ab1846 commit 761106aCopy full SHA for 761106a
ext/intl/tests/gh19261.phpt
@@ -0,0 +1,28 @@
1
+--TEST--
2
+MessageFormatter::parseMessage() with invalid locale
3
+--EXTENSIONS--
4
+intl
5
+--CREDITS--
6
+[email protected]
7
+--FILE--
8
+<?php
9
+
10
+$locale = 'root';
11
+$fmt = '{0,whatever} would not work!';
12
13
+$str = 'failing';
14
15
+$m = MessageFormatter::parseMessage($locale, $fmt, $str);
16
+var_dump($m);
17
+var_dump(intl_get_error_message());
18
19
+$m = msgfmt_parse_message($locale, $fmt, $str);
20
21
22
23
+?>
24
+--EXPECT--
25
+bool(false)
26
+string(59) "Creating message formatter failed: U_ILLEGAL_ARGUMENT_ERROR"
27
28
0 commit comments