Bug #77583 [Opn->Dup]: The message for class “Exception” causes PHP Fatal Error

From: Date: Fri, 08 Feb 2019 04:48:03 +0000
Subject: Bug #77583 [Opn->Dup]: The message for class “Exception” causes PHP Fatal Error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219421@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77583&edit=1 ID: 77583 Updated by: requinix@php.net Reported by: p_i at ukr dot net Summary: The message for class “Exception” causes PHP Fatal Error -Status: Open +Status: Duplicate Type: Bug -Package: Compile Failure +Package: Scripting Engine problem Operating System: irrelevant PHP Version: 7.2.15 Block user comment: N Private report: N New Comment: Duplicate of bug #70894 Previous Comments: ------------------------------------------------------------------------ [2019-02-08 00:53:10] p_i at ukr dot net Description: ------------ After execute this simple code: $message = 'some text '.inet_pton('119.252.33.171'); 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: --------------- <?php //http://sandbox.onlinephpfunctions.com/code/0010e95a4bec4f6a4521ad58af90db256db6224b $message = 'some text '.inet_pton('119.252.33.171'); //$message = preg_replace( '/[^[:print:]\r\n]/', 'X', $message); throw new \Exception($message); //$message = 'some text '; //throw new \Exception($message); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77583&edit=1

« previous php.bugs (#219421) next »