summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-04-24 10:48:49 +0200
committerAnatol Belski <ab@php.net>2018-04-24 10:48:49 +0200
commit919ead11578be5c8bd954d8322e92c484b62facb (patch)
tree577da4e73394d8c7f19cc62d2a54f64fc7f839a3
parent95ee9efa572ae7b6931c846833a3283f06610a2e (diff)
parent3070883bcfc0cf65dd1484a5a233d6a3643f089e (diff)
downloadphp-git-919ead11578be5c8bd954d8322e92c484b62facb.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix test portability
-rw-r--r--ext/iconv/tests/bug76249.phpt6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/iconv/tests/bug76249.phpt b/ext/iconv/tests/bug76249.phpt
index 1503f0bc81..0a2dcaed2f 100644
--- a/ext/iconv/tests/bug76249.phpt
+++ b/ext/iconv/tests/bug76249.phpt
@@ -7,12 +7,14 @@ Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequen
$fh = fopen('php://memory', 'rw');
fwrite($fh, "abc");
rewind($fh);
-stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, []);
+if (false === @stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, [])) {
+ stream_filter_append($fh, 'convert.iconv.ucs-2/utf-8//IGNORE', STREAM_FILTER_READ, []);
+}
$a = stream_get_contents($fh);
var_dump(strlen($a));
?>
DONE
--EXPECTF--
-Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
+Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf%A8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
int(3)
DONE