mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
This commit is contained in:
commit
2783670daa
4 changed files with 20 additions and 11 deletions
|
@ -2500,7 +2500,8 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, zend_string *subject_str,
|
|||
match_data = pcre2_match_data_create_from_pattern(pce->re, gctx);
|
||||
if (!match_data) {
|
||||
PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR;
|
||||
return;
|
||||
zval_ptr_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2620,6 +2621,11 @@ error:
|
|||
pcre2_match_data_free(match_data);
|
||||
}
|
||||
|
||||
if (PCRE_G(error_code) != PHP_PCRE_NO_ERROR) {
|
||||
zval_ptr_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
last:
|
||||
start_offset = (last_match - ZSTR_VAL(subject_str)); /* the offset might have been incremented, but without further successful matches */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue