Skip to content

Commit c0cb689

Browse files
committed
Return False on invalid encoded string
1 parent 31a471d commit c0cb689

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/mbstring/php_mbregex.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,7 @@ PHP_FUNCTION(mb_ereg_match)
13031303
}
13041304

13051305
if (!php_mb_check_encoding(string, string_len, php_mb_regex_get_mbctype_encoding())) {
1306-
zend_argument_value_error(2, "must be a valid string in '%s'", php_mb_regex_get_mbctype());
1307-
RETURN_THROWS();
1306+
RETURN_FALSE;
13081307
}
13091308

13101309
if ((re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, syntax)) == NULL) {

0 commit comments

Comments
 (0)