Skip to content

Commit fc65492

Browse files
author
cpriest
committed
Moved a variable declaration to beginning of block.
1 parent 0c79de8 commit fc65492

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_compile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,8 @@ void zend_do_begin_accessor_declaration(znode *function_token, znode *var_name,
16921692
} else if(Z_TYPE(function_token->u.constant) == IS_STRING && strcasecmp("set", Z_STRVAL(function_token->u.constant)) == 0) {
16931693
/* Convert type and variable name to __setHours() */
16941694
char *tmp = strcatalloc("__set", 5, Z_STRVAL(var_name->u.constant), Z_STRLEN(var_name->u.constant) TSRMLS_CC);
1695+
znode unused_node, unused_node2, value_node;
1696+
16951697
efree(Z_STRVAL(function_token->u.constant));
16961698
ZVAL_STRINGL(&function_token->u.constant, tmp, 5 + Z_STRLEN(var_name->u.constant), 0);
16971699

@@ -1702,7 +1704,6 @@ void zend_do_begin_accessor_declaration(znode *function_token, znode *var_name,
17021704
zend_do_begin_function_declaration(function_token, function_token, 1, ZEND_RETURN_VAL, modifiers, ZEND_FNP_PROP_SETTER TSRMLS_CC);
17031705

17041706
/* Add $value parameter to __setHours() */
1705-
znode unused_node, unused_node2, value_node;
17061707
unused_node.op_type = unused_node2.op_type = IS_UNUSED;
17071708
unused_node.u.op.num = unused_node2.u.op.num = 1;
17081709

0 commit comments

Comments
 (0)