Bug #75675 [Opn->Csd]: Uncatchable Fatal error

From: Date: Fri, 22 Dec 2017 16:52:50 +0000
Subject: Bug #75675 [Opn->Csd]: Uncatchable Fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213244@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75675&edit=1 ID: 75675 Updated by: nikic@php.net Reported by: fabien dot papet at gmail dot com Summary: Uncatchable Fatal error -Status: Open +Status: Closed Type: Bug Package: *General Issues Operating System: Windows PHP Version: 7.1.12 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Applied https://github.com/php/php-src/commit/024637378827ff03ccfb6b903c9d9b968d30af8d to 7.1+, so this should be resolved now. Previous Comments: ------------------------------------------------------------------------ [2017-12-20 22:37:48] nikic@php.net Thanks for checking! I misread your initial output -- I thought execution aborts after the error, while what happens is that the exception is caught, but the error is also printed. The reason why it's printed for you (but was not for me) is probably that you have log_errors=1 set. I can now reproduce the same result. I will backport the previously mentioned commit to 7.1 and 7.2. This will remove the fatal error, but calls to the error handler for warnings may remain. ------------------------------------------------------------------------ [2017-12-20 22:05:52] fabien dot papet at gmail dot com tested in another computer with php 7.1.11 <?php echo 'start'.PHP_EOL; var_dump(extension_loaded('xdebug')); try { $client = new SoapClient('http://thisaddressdoesnotexists', ['exceptions' => true, 'trace' => 0]); } catch (SoapFault $exception) { var_dump('Exception: '.$exception->getMessage()); } catch (Exception $exception) { var_dump('Exception: '.$exception->getMessage()); } echo 'end'; php test.php start bool(false) PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://thisaddressdoesnotexists' : failed to load external entity "http://thisaddressdoesnotexists" in C:\Users\fabie\Desktop\test.php on line 7 string(157) "Exception: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://thisaddressdoesnotexists' : failed to load external entity "http://thisaddressdoesnotexists" " end ------------------------------------------------------------------------ [2017-12-20 20:26:39] nikic@php.net Can somebody who has this issue please check whether they have XDebug enabled and whether disabling it fixes the issue? If this is the case I can backport https://github.com/php/php-src/commit/1dfcd1af9aab9b760d971ceeac18e9e83c85f80f to 7.1, but I'd like to know whether this is the cause of the issue first. ------------------------------------------------------------------------ [2017-12-13 11:26:09] nikic@php.net Please check if you have XDebug enabled. This code does not reproduce on vanilla PHP. ------------------------------------------------------------------------ [2017-12-13 11:18:39] spam2 at rhsoft dot net BTW: in PHP7 "catch(Throwable $exception)" is the way to go in PHP7, it catches even parse errors in case of eval and so on ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75675 -- Edit this bug report at https://bugs.php.net/bug.php?id=75675&edit=1

« previous php.bugs (#213244) next »