Skip to content

Commit 804c708

Browse files
jcmcmb69
authored andcommitted
Add test for iconv_strpos() internal encoding error
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-8816.
1 parent 1a3d836 commit 804c708

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
iconv_strpos() - test against PHP's default internal encoding
3+
--EXTENSIONS--
4+
iconv
5+
--FILE--
6+
<?php
7+
$large_enconding = str_repeat("X", 256);
8+
ini_set("default_charset", $large_enconding);
9+
var_dump(iconv_strpos('Hello, world', 'world', -2));
10+
?>
11+
--EXPECTF--
12+
%AWarning: iconv_strpos(): Wrong encoding, conversion from %s
13+
bool(false)

0 commit comments

Comments
 (0)