]> granicus.if.org Git - php/commitdiff
Reduce var scope
authorAnatol Belski <ab@php.net>
Fri, 16 Feb 2018 17:42:02 +0000 (18:42 +0100)
committerAnatol Belski <ab@php.net>
Sat, 17 Feb 2018 12:02:49 +0000 (13:02 +0100)
ext/pcre/php_pcre.c

index cf99b6c6837e5de404d951d65bd6cd38feca58c1..350b7c35657a1ad3506f7724df5d7d3552871bb4 100644 (file)
@@ -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 */