mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
- Make sure expr_list and echo_list are either empty or comma seperated
expressions
This commit is contained in:
+6
-3
@@ -348,9 +348,8 @@ class_variable_decleration:
|
||||
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
echo_expr_list:
|
||||
/* empty */
|
||||
| echo_expr_list ',' expr { do_echo(&$3 CLS_CC); }
|
||||
| expr { do_echo(&$1 CLS_CC); }
|
||||
;
|
||||
@@ -358,7 +357,11 @@ echo_expr_list:
|
||||
|
||||
for_expr:
|
||||
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
|
||||
| for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| non_empty_for_expr { $$ = $1; }
|
||||
;
|
||||
|
||||
non_empty_for_expr:
|
||||
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
|
||||
| expr { $$ = $1; }
|
||||
;
|
||||
|
||||
|
||||
@@ -215,6 +215,12 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
|
||||
next_op->filename = zend_get_compiled_filename();
|
||||
next_op->result.op_type = IS_UNUSED;
|
||||
next_op->extended_value = 0;
|
||||
next_op->op1.u.EA.var = 0;
|
||||
next_op->op1.u.EA.type = 0;
|
||||
next_op->op2.u.EA.var = 0;
|
||||
next_op->op2.u.EA.type = 0;
|
||||
next_op->result.u.EA.var = 0;
|
||||
next_op->result.u.EA.type = 0;
|
||||
|
||||
return next_op;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user