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.3.3RC1~349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3857fd9631102cbe923cca8fce0d22a4c5c3199;p=php fix #51394 - try harder to find script lineno when exception happens --- diff --git a/NEWS b/NEWS index 014d3d3ad6..513489aded 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP NEWS - Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) +- Fixed bug #51394 (Error line reported incorrectly if error handler throws an + exception). (Stas) - Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains timezone). (Adam) - Fixed bug #51347 (mysqli_close / connection memory leak). (Andrey, Johannes) 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 {