Bug #77583 [NEW]: The message for class “Exception” causes PHP Fatal Error

From: Date: Fri, 08 Feb 2019 00:53:10 +0000
Subject: Bug #77583 [NEW]: The message for class “Exception” causes PHP Fatal Error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219414@lists.php.net to get a copy of this message
From: p_i at ukr dot net Operating system: irrelevant PHP version: 7.2.15 Package: Compile Failure Bug Type: Bug Bug description:The message for class “Exception” causes PHP Fatal Error 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 bug report at https://bugs.php.net/bug.php?id=77583&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77583&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77583&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77583&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77583&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77583&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77583&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77583&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77583&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77583&r=support Expected behavior: https://bugs.php.net/fix.php?id=77583&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77583&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77583&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77583&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77583&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77583&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77583&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77583&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77583&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77583&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77583&r=mysqlcfg

« previous php.bugs (#219414) next »