|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77601 WSDL parsing issue throws a fatal error instead of a SOAPFault exception
Submitted: 2019-02-11 09:26 UTC Modified: 2019-02-12 08:42 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nikstar at ukr dot net Assigned: derick (profile)
Status: Wont fix Package: SOAP related
PHP Version: 7.3.2 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nikstar at ukr dot net
New email:
PHP Version: OS:


 [2019-02-11 09:26 UTC] nikstar at ukr dot net
Subclassing the SoapClient class and wrapping the call to the parent constructor will throw a fatal error even when wrapped in a try...catch(\Throwable $t).

With PHP 7.3.2 try...catch(\Throwable $t) being a convenient method of adding fault tolerance and graceful degradation -- it is therefore very frustrating when a WSDL PARSE issue is encountered that an UNCATCHABLE script exiting fatal error is issued.

Test script:
class SoapAgent extends \SoapClient
    public function __construct(string $wsdl)
        try {
            echo 'Success!' . PHP_EOL;
        } catch (\Throwable $t) {

$client = new SoapAgent('test');

Expected result:
var_dump() of the Throwable object.

Actual result:
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'test' : failed to load external entity "test"

Process finished with exit code 255


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-11 09:44 UTC]
-Status: Open +Status: Feedback
 [2019-02-11 09:44 UTC]
I can't reproduce this. I know this used to be an issue, but was fixed in bug 
#70469. Are you sure that this is on PHP 7.3.2 and not some older version also installed on your system? Can you check if it works with php -n (-n meaning no ini file)?
 [2019-02-11 10:06 UTC] nikstar at ukr dot net
This bug is reproducing in PHP 7.3.2 with enabled Xdebug extension. 
With disabled Xdebug - bug not reproduce.
 [2019-02-11 10:26 UTC]
-Status: Feedback +Status: Open -Assigned To: +Assigned To: derick
 [2019-02-11 10:26 UTC]
@derick: Is there anything that can be done about this on the xdebug side? ext/soap has some horrible error handling where it throws fatal errors all over the place and uses a custom error handler to convert them to exceptions and bail out (soap_error_handler). I think the interaction with xdebug might be because xdebug ends up wrapping the soap handler, rather than soap the xdebug handler.
 [2019-02-12 08:33 UTC] nikstar at ukr dot net
This bug was fixed by @derick on the xdebug side.

Thank you!
 [2019-02-12 08:42 UTC]
-Status: Assigned +Status: Wont fix
 [2019-02-12 08:42 UTC]
Great, marking it as Won't Fix here then. It would be nice to refactor the whole SOAP implementation, but I kind of doubt someone will actually do it...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 00:01:30 2024 UTC