Skip to content

Commit 9b4094c

Browse files
committed
Fix incorrect zpp parameter count in mb_substr() / mb_strcut()
These functions only accept 4 params.
1 parent a7e84e2 commit 9b4094c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mbstring/mbstring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ PHP_FUNCTION(mb_substr)
21302130
zend_bool len_is_null = 1;
21312131
mbfl_string string, result, *ret;
21322132

2133-
ZEND_PARSE_PARAMETERS_START(2, 5)
2133+
ZEND_PARSE_PARAMETERS_START(2, 4)
21342134
Z_PARAM_STRING(str, str_len)
21352135
Z_PARAM_LONG(from)
21362136
Z_PARAM_OPTIONAL
@@ -2194,7 +2194,7 @@ PHP_FUNCTION(mb_strcut)
21942194
zend_bool len_is_null = 1;
21952195
mbfl_string string, result, *ret;
21962196

2197-
ZEND_PARSE_PARAMETERS_START(2, 5)
2197+
ZEND_PARSE_PARAMETERS_START(2, 4)
21982198
Z_PARAM_STRING(string_val, string.len)
21992199
Z_PARAM_LONG(from)
22002200
Z_PARAM_OPTIONAL

0 commit comments

Comments
 (0)