From: Xinchen Hui Date: Fri, 17 Aug 2012 13:18:20 +0000 (+0800) Subject: Fixed context info in error message X-Git-Tag: php-5.5.0alpha1~20^2~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24493652382c985b13a9ed94aae5fffae16a6895;p=php Fixed context info in error message --- 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"); } }