Skip to content

Commit 15a0ff0

Browse files
staabmondrejmirtes
authored andcommitted
str_split() length parameter is always positive
1 parent b410b13 commit 15a0ff0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

resources/functionMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11696,7 +11696,7 @@
1169611696
'str_replace' => ['string|array', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_replace_count='=>'int'],
1169711697
'str_rot13' => ['string', 'str'=>'string'],
1169811698
'str_shuffle' => ['string', 'str'=>'string'],
11699-
'str_split' => ['array<int,string>|false', 'str'=>'string', 'split_length='=>'int'],
11699+
'str_split' => ['array<int,string>|false', 'str'=>'string', 'split_length='=>'positive-int'],
1170011700
'str_word_count' => ['array<int,string>|int|false', 'string'=>'string', 'format='=>'int', 'charlist='=>'string'],
1170111701
'strcasecmp' => ['int', 'str1'=>'string', 'str2'=>'string'],
1170211702
'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],

resources/functionMap_php74delta.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'FFI::typeof' => ['FFI\CType', '&ptr'=>'FFI\CData'],
4040
'FFI::type' => ['FFI\CType', 'type'=>'string'],
4141
'get_mangled_object_vars' => ['array', 'obj'=>'object'],
42-
'mb_str_split' => ['array<int,string>|false', 'str'=>'string', 'split_length='=>'int', 'encoding='=>'string'],
42+
'mb_str_split' => ['array<int,string>|false', 'str'=>'string', 'split_length='=>'positive-int', 'encoding='=>'string'],
4343
'password_algos' => ['array<int, string>'],
4444
'password_hash' => ['string|false', 'password'=>'string', 'algo'=>'string|null', 'options='=>'array'],
4545
'password_needs_rehash' => ['bool', 'hash'=>'string', 'algo'=>'string|null', 'options='=>'array'],

resources/functionMap_php80delta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
'imagerotate' => ['false|object', 'src_im'=>'resource', 'angle'=>'float', 'bgdcolor'=>'int', 'ignoretransparent='=>'int'],
7070
'imagescale' => ['false|object', 'im'=>'resource', 'new_width'=>'int', 'new_height='=>'int', 'method='=>'int'],
7171
'mb_decode_numericentity' => ['string|false', 'string'=>'string', 'convmap'=>'array', 'encoding='=>'string'],
72-
'mb_str_split' => ['array<int,string>', 'str'=>'string', 'split_length='=>'int', 'encoding='=>'string'],
72+
'mb_str_split' => ['array<int,string>', 'str'=>'string', 'split_length='=>'positive-int', 'encoding='=>'string'],
7373
'mktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
7474
'odbc_exec' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string'],
7575
'parse_str' => ['void', 'encoded_string'=>'string', '&w_result'=>'array'],
@@ -83,7 +83,7 @@
8383
'socket_select' => ['int|false', '&rw_read'=>'Socket[]|null', '&rw_write'=>'Socket[]|null', '&rw_except'=>'Socket[]|null', 'seconds'=>'int|null', 'microseconds='=>'int'],
8484
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'],
8585
'str_contains' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
86-
'str_split' => ['array<int,string>', 'str'=>'string', 'split_length='=>'int'],
86+
'str_split' => ['array<int,string>', 'str'=>'string', 'split_length='=>'positive-int'],
8787
'str_ends_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
8888
'str_starts_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
8989
'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],

0 commit comments

Comments
 (0)