diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-12-26 17:20:13 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-12-26 17:20:13 +0100 |
commit | 27e9c05e8108fe6c184178997176896fb91a3451 (patch) | |
tree | fc2d55695b51206ee95c6f42fadf07285a19498f /ext/zip/php_zip.c | |
parent | fc30c0f7adbddd491266fdbf80427c348d249e01 (diff) | |
download | php-git-27e9c05e8108fe6c184178997176896fb91a3451.tar.gz |
Remove preg_options param from pcre_get_compiled_regex()
This parameter is always zero and not necessary to call pcre2_match.
I'm leaving the parameter behind on the _ex() variant, so the preg_flags
are still accessible in some way.
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index a7f63b0526..5aa17fb669 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -654,10 +654,10 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val if (files_cnt > 0) { pcre2_code *re = NULL; pcre2_match_data *match_data = NULL; - uint32_t preg_options = 0, i, capture_count; + uint32_t i, capture_count; int rc; - re = pcre_get_compiled_regex(regexp, &capture_count, &preg_options); + re = pcre_get_compiled_regex(regexp, &capture_count); if (!re) { php_error_docref(NULL, E_WARNING, "Invalid expression"); return -1; @@ -703,7 +703,7 @@ int php_zip_pcre(zend_string *regexp, char *path, int path_len, zval *return_val zend_string_release_ex(namelist[i], 0); continue; } - rc = pcre2_match(re, (PCRE2_SPTR)ZSTR_VAL(namelist[i]), ZSTR_LEN(namelist[i]), 0, preg_options, match_data, mctx); + rc = pcre2_match(re, (PCRE2_SPTR)ZSTR_VAL(namelist[i]), ZSTR_LEN(namelist[i]), 0, 0, match_data, mctx); php_pcre_free_match_data(match_data); /* 0 means that the vector is too small to hold all the captured substring offsets */ if (rc < 0) { |