Skip to content

Commit

Permalink
Add test for iconv_strpos() internal encoding error
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-8816.
  • Loading branch information
jcm authored and cmb69 committed Jun 21, 2022
1 parent 1a3d836 commit 804c708
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ext/iconv/tests/iconv_strpos_error_001.phpt
@@ -0,0 +1,13 @@
--TEST--
iconv_strpos() - test against PHP's default internal encoding
--EXTENSIONS--
iconv
--FILE--
<?php
$large_enconding = str_repeat("X", 256);
ini_set("default_charset", $large_enconding);
var_dump(iconv_strpos('Hello, world', 'world', -2));
?>
--EXPECTF--
%AWarning: iconv_strpos(): Wrong encoding, conversion from %s
bool(false)

0 comments on commit 804c708

Please sign in to comment.