mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove code duplication
And fix indentation
This commit is contained in:
parent
8e2f0824f7
commit
e357f67faf
1 changed files with 8 additions and 12 deletions
|
@ -700,23 +700,19 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!php_mb_check_encoding(
|
||||
string,
|
||||
string_len,
|
||||
_php_mb_regex_mbctype2name(MBREX(current_mbctype))
|
||||
)) {
|
||||
if (array != NULL) {
|
||||
zval_dtor(array);
|
||||
array_init(array);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (array != NULL) {
|
||||
zval_dtor(array);
|
||||
array_init(array);
|
||||
}
|
||||
|
||||
if (!php_mb_check_encoding(
|
||||
string,
|
||||
string_len,
|
||||
_php_mb_regex_mbctype2name(MBREX(current_mbctype))
|
||||
)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
options = MBREX(regex_default_options);
|
||||
if (icase) {
|
||||
options |= ONIG_OPTION_IGNORECASE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue