summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-02-16 18:42:02 +0100
committerAnatol Belski <ab@php.net>2018-02-17 13:02:49 +0100
commit28132878f2d8073baa37bfb7e26b847fa5630aca (patch)
tree49e7775912ff6a909e2733cd1fc2a9c577efd3fd /ext/pcre/php_pcre.c
parent257f07ef6d650936469dfed292a852f568e562b4 (diff)
downloadphp-git-28132878f2d8073baa37bfb7e26b847fa5630aca.tar.gz
Reduce var scope
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index cf99b6c683..350b7c3565 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -2074,7 +2074,6 @@ static zend_always_inline zend_string *php_replace_in_subject(zval *regex, zval
*/
static zend_string *php_replace_in_subject_func(zval *regex, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *subject, size_t limit, size_t *replace_count)
{
- zval *regex_entry;
zend_string *result;
zend_string *subject_str = zval_get_string(subject);
@@ -2087,6 +2086,8 @@ static zend_string *php_replace_in_subject_func(zval *regex, zend_fcall_info *fc
zend_string_release(subject_str);
return result;
} else {
+ zval *regex_entry;
+
/* If regex is an array */
/* For each entry in the regex array, get the entry */