Skip to content

Commit a4b6f7f

Browse files
committed
ext/mbstring: Move variable declaration to inner scope
1 parent 3c311c9 commit a4b6f7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mbstring/mbstring.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,6 @@ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding)
840840
/* {{{ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) */
841841
static PHP_INI_MH(OnUpdate_mbstring_substitute_character)
842842
{
843-
int c;
844-
char *endptr = NULL;
845-
846843
if (new_value != NULL) {
847844
if (zend_string_equals_literal_ci(new_value, "none")) {
848845
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
@@ -857,6 +854,9 @@ static PHP_INI_MH(OnUpdate_mbstring_substitute_character)
857854
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
858855
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
859856
if (ZSTR_LEN(new_value) > 0) {
857+
int c;
858+
char *endptr = NULL;
859+
860860
c = strtol(ZSTR_VAL(new_value), &endptr, 0);
861861
if (*endptr == '\0') {
862862
MBSTRG(filter_illegal_substchar) = c;

0 commit comments

Comments
 (0)