summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-03-27 19:45:03 +0200
committerAnatol Belski <ab@php.net>2017-03-27 19:45:03 +0200
commitbf673d353e699ae6b3d3994256c16ef87388c685 (patch)
treefbe638ad1b85e42c77b8e6471295f092dde0fc53
parente3b2b05229c6db866bacc1758ac10200bf45dcd3 (diff)
parent6508320936ab5e9694b7d282a57462179a0fb1bc (diff)
downloadphp-git-bf673d353e699ae6b3d3994256c16ef87388c685.tar.gz
Merge branch 'PHP-7.1'
* PHP-7.1: deps updated, cherry-pick 88642decf9ab59d206db515990886b0761bfa835 add test for bug #74230
-rw-r--r--ext/intl/tests/bug74230.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/intl/tests/bug74230.phpt b/ext/intl/tests/bug74230.phpt
new file mode 100644
index 0000000000..70ef6ae39a
--- /dev/null
+++ b/ext/intl/tests/bug74230.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #74230 iconv fails to fail on surrogates
+--SKIPIF--
+<?php if(!extension_loaded('iconv')) print 'skip'; ?>
+--FILE--
+<?php
+
+$high = "\xED\xa1\x92"; // codepoint D852
+$low = "\xED\xBD\xA2"; // codepoint DF62
+$pair = $high.$low;
+var_dump(
+ @\iconv('UTF-8', 'UTF-8', $high) === false,
+ @\iconv('UTF-8', 'UTF-8', $low) === false,
+ @\iconv('UTF-8', 'UTF-8', $pair) === false
+);
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+