From cf4ea31bff28d0a3683a1dceb81047111ab32ca8 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Thu, 1 Apr 2010 19:36:56 +0000 Subject: [PATCH] fix #51394 - try harder to find script lineno when exception happens --- Zend/tests/bug51394.phpt | 16 ++++++++++++++++ Zend/zend_execute_API.c | 4 ++++ 2 files changed, 20 insertions(+) create mode 100644 Zend/tests/bug51394.phpt 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 { -- 2.50.1