mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
fixed #43994 mb_ereg 'successfully' matching incorrectly.
This commit is contained in:
parent
179b370957
commit
ad400f1144
@ -546,6 +546,13 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||
convert_to_string_ex(arg_pattern);
|
||||
/* don't bother doing an extended regex with just a number */
|
||||
}
|
||||
|
||||
if (!Z_STRVAL_PP(arg_pattern) || Z_STRLEN_PP(arg_pattern) == 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
|
||||
RETVAL_FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
re = php_mbregex_compile_pattern(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern), options, MBSTRG(current_mbctype), MBSTRG(regex_default_syntax) TSRMLS_CC);
|
||||
if (re == NULL) {
|
||||
RETVAL_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user