summaryrefslogtreecommitdiff
path: root/ext/intl/tests/dateformat_bug68893.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/tests/dateformat_bug68893.phpt')
-rw-r--r--ext/intl/tests/dateformat_bug68893.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/intl/tests/dateformat_bug68893.phpt b/ext/intl/tests/dateformat_bug68893.phpt
new file mode 100644
index 0000000000..b3faf54342
--- /dev/null
+++ b/ext/intl/tests/dateformat_bug68893.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #68893 Stackoverflow in datefmt_create
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+$f = datefmt_create("en_us", -10000000, 1);
+var_dump($f, intl_get_error_message());
+
+$f = datefmt_create("en_us", 1, -10000000);
+var_dump($f, intl_get_error_message());
+
+?>
+--EXPECT--
+NULL
+string(67) "datefmt_create: invalid date format style: U_ILLEGAL_ARGUMENT_ERROR"
+NULL
+string(67) "datefmt_create: invalid time format style: U_ILLEGAL_ARGUMENT_ERROR"