Bug #74725 [Opn->Csd]: html_errors=1 breaks unhandled exceptions
| From: | ajf@php.net | Date: | Sat, 12 Aug 2017 00:40:05 +0000 |
| Subject: | Bug #74725 [Opn->Csd]: html_errors=1 breaks unhandled exceptions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210622@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74725&edit=1
ID: 74725
Updated by: ajf@php.net
Reported by: anrdaemon at freemail dot ru
Summary: html_errors=1 breaks unhandled exceptions
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: All
PHP Version: 7.1.6
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of ajf@ajf.me
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b59718bdc439f82fa1beae2c4ea1582c38bc8de3
Log: Fix bug #74725 (html_errors=1 breaks unhandled exceptions)
Previous Comments:
------------------------------------------------------------------------
[2017-06-09 08:48:40] anrdaemon at freemail dot ru
Description:
------------
When a non-UTF-8 message is passed to the thrown exception, and exception is unhandled, the
resulting output of the internal exception handler is missing exception's information
(message/backtrace).
Regression since PHP 5.4
Reproducible with at least CLI, FCGI and FPM SAPI's, on Debian and Windows.
Ref: https://3v4l.org/Ah2XP
Test script:
---------------
<?php
ini_set('display_errors', 1);
ini_set('html_errors', 1);
ini_set('default_charset', "Windows-1251");
throw new Exception("\xF2\xE5\xF1\xF2"); // "ÑеÑÑ"
Expected result:
----------------
<br />
<b>Fatal error</b>: Uncaught exception 'Exception' with message
'ÑеÑÑ' in /path/file:5
Stack trace:
#0 {main}
thrown in <b>/path/file</b> on line <b>5</b><br />
Process exited with code 255.
Actual result:
--------------
<br />
<b>Fatal error</b>: in <b>/path/file</b> on line
<b>5</b><br />
Process exited with code 255.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74725&edit=1