diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-12-26 17:11:27 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-12-26 17:11:27 +0100 |
commit | b1deb98c42328488cfce61d49d9607ed44fff7a4 (patch) | |
tree | a8375a2f2944cf1f8e4c22033bd16a64f679da79 /ext/pcre/php_pcre.c | |
parent | 078c1d8ef75dbbf0f71aa30c5afbeaa3e5ec41dd (diff) | |
download | php-git-b1deb98c42328488cfce61d49d9607ed44fff7a4.tar.gz |
Fixed bug #77338
Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These
options are intended to be passed to pcre2_match. However, we do
not have any flags that actually need to be set during matching
(all relevant flags are set during compilation), and the preg_flags
value is used for PHP-specific flags instead.
This parameter should be removed entirely in master to avoid confusion.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index ff86458fbf..a7c1a93646 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -867,7 +867,7 @@ PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex); if (preg_options) { - *preg_options = pce ? pce->preg_options : 0; + *preg_options = 0; } if (capture_count) { *capture_count = pce ? pce->capture_count : 0; @@ -884,7 +884,7 @@ PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capt pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex); if (preg_options) { - *preg_options = pce ? pce->preg_options : 0; + *preg_options = 0; } if (compile_options) { *compile_options = pce ? pce->compile_options : 0; |