diff options
| author | Jason Greene <jason@php.net> | 2002-07-30 22:19:50 +0000 |
|---|---|---|
| committer | Jason Greene <jason@php.net> | 2002-07-30 22:19:50 +0000 |
| commit | b0cf6c31122f31d9f4ac2c03263e1a2db6252dda (patch) | |
| tree | 4321dce2a4945d9bef6207469ead6a9ed52c41e2 /Zend/zend_compile.c | |
| parent | 838b8ba49f3311d510d54358a5dc70ebc4a6ac2a (diff) | |
| download | php-git-b0cf6c31122f31d9f4ac2c03263e1a2db6252dda.tar.gz | |
MFZE1 global declare
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e1cac9175e..99aa9709a7 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2864,6 +2864,7 @@ void zend_do_foreach_end(znode *foreach_token, znode *open_brackets_token TSRMLS void zend_do_declare_begin(TSRMLS_D) { zend_stack_push(&CG(declare_stack), &CG(declarables), sizeof(zend_declarables)); + CG(declarables).beginop = get_next_op_number(CG(active_op_array)); } @@ -2884,7 +2885,10 @@ void zend_do_declare_end(TSRMLS_D) zend_declarables *declarables; zend_stack_top(&CG(declare_stack), (void **) &declarables); - CG(declarables) = *declarables; + /* We should restore if there was more than (current - start) - (ticks?1:0) opcodes */ + if ((get_next_op_number(CG(active_op_array)) - CG(declarables).beginop) - ((CG(declarables).ticks.value.lval)?1:0)) { + CG(declarables) = *declarables; + } } |
