PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Oct 2005, PHP 5.1 Release Candidate 3
+- Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)
14 Oct 2005, PHP 5.1 Release Candidate 2
- Changed SQLite extension to be a shared module in Windows distribution.
}
value_node = opline->result;
- if (assign_by_ref) {
+ zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
+ if (assign_by_ref) {
/* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */
zend_do_assign_ref(NULL, value, &value_node TSRMLS_CC);
} else {
if (key->op_type != IS_UNUSED) {
znode key_node;
- opline = &CG(active_op_array)->opcodes[as_token->u.opline_num+1];
+ zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
+ opline = &CG(active_op_array)->opcodes[as_token->u.opline_num+1];
opline->result.op_type = IS_TMP_VAR;
opline->result.u.EA.type = 0;
opline->result.u.opline_num = get_temporary_variable(CG(active_op_array));
foreach_statement { zend_do_foreach_end(&$1, &$5 TSRMLS_CC); }
| T_FOREACH '(' expr_without_variable { zend_do_foreach_begin(&$1, &$2, &$3, 0 TSRMLS_CC); } T_AS
{ zend_do_foreach_fetch(&$1, &$2, &$5 TSRMLS_CC); }
- w_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$1, &$5, &$7, &$8 TSRMLS_CC); }
+ variable foreach_optional_arg ')' { zend_check_writable_variable(&$7); zend_do_foreach_cont(&$1, &$5, &$7, &$8 TSRMLS_CC); }
foreach_statement { zend_do_foreach_end(&$1, &$5 TSRMLS_CC); }
| T_DECLARE { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
| ';' /* empty statement */
foreach_variable:
- w_variable { $$ = $1; }
- | '&' w_variable { $$ = $2; $$.u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; }
+ variable { zend_check_writable_variable(&$1); $$ = $1; }
+ | '&' variable { zend_check_writable_variable(&$2); $$ = $2; $$.u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; }
;
for_statement: