From: Stanislav Malyshev Date: Thu, 1 Apr 2010 19:36:56 +0000 (+0000) Subject: fix #51394 - try harder to find script lineno when exception happens X-Git-Tag: php-5.4.0alpha1~191^2~1812 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf4ea31bff28d0a3683a1dceb81047111ab32ca8;p=php fix #51394 - try harder to find script lineno when exception happens --- diff --git a/Zend/tests/bug51394.phpt b/Zend/tests/bug51394.phpt new file mode 100644 index 0000000000..537574c9d5 --- /dev/null +++ b/Zend/tests/bug51394.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #51394 (Error line reported incorrectly if error handler throws an exception) +--INI-- +error_reporting=-1 +--FILE-- +opcode == ZEND_HANDLE_EXCEPTION && + active_opline->lineno == 0 && EG(opline_before_exception)) { + return EG(opline_before_exception)->lineno; + } if (EG(opline_ptr)) { return active_opline->lineno; } else {