Skip to content
Permalink
Browse files

fix "iconv_strlen()" return type

-> some tests in "https://github.com/voku/portable-utf8" fails if I remove the false check e.g. for this string:

// string with UTF-16 (LE) BOM + valid UTF-8 && invalid UTF-8
$string = "\xFF\xFE" . 'string <strong>with utf-8 chars åèä</strong>' . "\xa0\xa1" . ' - doo-bee doo-bee dooh';
  • Loading branch information...
voku authored and muglug committed Apr 14, 2019
1 parent d145f17 commit 605364acd0d9536cbd3f5ce7fa35db7043374d7d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Psalm/Internal/CallMap.php
@@ -5149,7 +5149,7 @@
'iconv_mime_decode_headers' => ['array|false', 'headers'=>'string', 'mode='=>'int', 'charset='=>'string'],
'iconv_mime_encode' => ['string|false', 'field_name'=>'string', 'field_value'=>'string', 'preference='=>'array'],
'iconv_set_encoding' => ['bool', 'type'=>'string', 'charset'=>'string'],
'iconv_strlen' => ['int', 'str'=>'string', 'charset='=>'string'],
'iconv_strlen' => ['int|false', 'str'=>'string', 'charset='=>'string'],
'iconv_strpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'charset='=>'string'],
'iconv_strrpos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'charset='=>'string'],
'iconv_substr' => ['string|false', 'str'=>'string', 'offset'=>'int', 'length='=>'int', 'charset='=>'string'],

0 comments on commit 605364a

Please sign in to comment.
You can’t perform that action at this time.