diff options
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index a7c1a93646..da5b69ed55 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -862,13 +862,10 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex) /* {{{ pcre_get_compiled_regex */ -PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options) +PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture_count) { pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex); - if (preg_options) { - *preg_options = 0; - } if (capture_count) { *capture_count = pce ? pce->capture_count : 0; } @@ -884,7 +881,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 = 0; + *preg_options = pce ? pce->preg_options : 0; } if (compile_options) { *compile_options = pce ? pce->compile_options : 0; |