From: Nikita Popov Date: Wed, 16 Jul 2014 21:27:27 +0000 (+0200) Subject: Lineno corrections X-Git-Tag: POST_AST_MERGE^2~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20d2a044eea54847226d8bd3f90355c45038a974;p=php Lineno corrections --- diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 1e40455022..85b6448908 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -48,7 +48,7 @@ ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) static zend_ast *zend_ast_create_from_va_list( zend_uint children, zend_ast_kind kind, zend_ast_attr attr, va_list va ) { - /*TSRMLS_FETCH();*/ + TSRMLS_FETCH(); zend_uint i; zend_ast *ast; @@ -65,9 +65,9 @@ static zend_ast *zend_ast_create_from_va_list( } } - /*if (ast->lineno == UINT_MAX) { + if (ast->lineno == UINT_MAX) { ast->lineno = CG(zend_lineno); - }*/ + } return ast; } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e7a28b2572..145f98981a 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6778,6 +6778,8 @@ void zend_compile_try(zend_ast *ast TSRMLS_DC) { CG(active_op_array)->try_catch_array[try_catch_offset].catch_op = opnum_catch; } + CG(zend_lineno) = catch_ast->lineno; + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_CATCH; opline->op1_type = IS_CONST;