|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77583 The message for class “Exception” causes PHP Fatal Error
Submitted: 2019-02-08 00:53 UTC Modified: 2019-02-08 04:48 UTC
From: p_i at ukr dot net Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 7.2.15 OS: irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: p_i at ukr dot net
New email:
PHP Version: OS:


 [2019-02-08 00:53 UTC] p_i at ukr dot net
After execute this simple code:

$message = 'some text '.inet_pton('');
throw new \Exception($message);
PHP returns Fatal Error

Fatal error</b>: in ...

This behavior is noticed when converting many other IPs. At the moment I solved the problem with the following line before "throw new":

$message = preg_replace( '/[^[:print:]\r\n]/', '_', $message);

Test script:

$message = 'some text '.inet_pton('');
//$message = preg_replace( '/[^[:print:]\r\n]/', 'X', $message);
throw new \Exception($message);
//$message = 'some text ';
//throw new \Exception($message);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-08 04:48 UTC]
-Status: Open +Status: Duplicate -Package: Compile Failure +Package: Scripting Engine problem
 [2019-02-08 04:48 UTC]
Duplicate of bug #70894
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 16:01:33 2024 UTC