From 24493652382c985b13a9ed94aae5fffae16a6895 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 17 Aug 2012 21:18:20 +0800 Subject: [PATCH] Fixed context info in error message --- Zend/zend_compile.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d7ca6eab33..bad9411a2f 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2289,6 +2289,11 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 end = op_array->opcodes + opline->op1.opline_num; while (++p < end) { if (p->opcode == ZEND_LEAVE) { + if (pass2) { + CG(in_compilation) = 1; + CG(active_op_array) = op_array; + CG(zend_lineno) = opline->lineno; + } zend_error(E_COMPILE_ERROR, "'goto' out of a finally block is disallowed"); } } -- 2.50.1