Bug #75675 [Fbk]: Uncatchable Fatal error
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: Feedback
Type: Bug
Package: *General Issues
Operating System: Windows
PHP Version: 7.1.12
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2017-12-13 11:16:10] spam2 at rhsoft dot net
this is *not* a general issue - it's the SOAP extension
i reported that more than a year ago - it's hard to understand why this behvaior don't get
fixed at all because you can't write any sane code based on SOAP requests where it's
naturally that the remote side may not be reachable and you can't handle errors at all the way
it works currently
https://bugs.php.net/bug.php?id=73451
[2017-04-08 10:36 UTC] nikic@php.net
Looks like fatal erros in SOAP were for some reason not part of https://wiki.php.net/rfc/throw_error_in_extensions
-- probably because SOAP uses non-standard macros to generate them.
------------------------------------------------------------------------
[2017-12-13 11:10:59] fabien dot papet at gmail dot com
Description:
------------
It seems like an uncacthable fatal error is thrown with an exception when an url is unreachable
Test script:
---------------
<?php
echo 'start'.PHP_EOL;
set_error_handler(function() {
echo 'error'.PHP_EOL;
}, E_ALL);
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';
Expected result:
----------------
start
string(143) "Exception: SOAP-ERROR: Parsing WSDL: Couldn't load from
'thisaddressdoesnotexists' : failed to load external entity
"thisaddressdoesnotexists"
"
end
Actual result:
--------------
start
error
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from
'thisaddressdoesnotexists' : failed to load external entity
"thisaddressdoesnotexists"
in C:\Users\.....\soaptest.php on line 9
string(143) "Exception: SOAP-ERROR: Parsing WSDL: Couldn't load from
'thisaddressdoesnotexists' : failed to load external entity
"thisaddressdoesnotexists"
"
end
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75675&edit=1
Thread (8 messages)