diff options
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e655e8480c..3ae9567a94 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1881,6 +1881,11 @@ static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, z static void zend_emit_tick(void) /* {{{ */ { + /* This prevents a double TICK generated by the parser statement of "declare()" */ + if (CG(active_op_array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) { + return; + } + zend_op *opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_TICKS; |
