|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65779 Downgrade network error in SoapClient to E_WARNING
Submitted: 2013-09-28 07:21 UTC Modified: -
Avg. Score:4.6 ± 0.6
Reproduced:19 of 19 (100.0%)
Same Version:8 (42.1%)
Same OS:14 (73.7%)
From: xfra35 at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.5.4 OS: Any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-09-28 07:21 UTC] xfra35 at gmail dot com
Could you please downgrade the error raised by the SoapClient constructor when the 
provided wsdl file cannot be found from E_ERROR to E_WARNING? A network error is 
not fatal.

This issue has been discussed many times but was mixed with other issues (like 
xdebug interference..) and at the end nothing was done. Cf.
> [2010-09-02 19:37 UTC]
> Right, so this is not a PHP bug.  Perhaps a feature request to downgrade that 
> particular error to a Warning instead of a catchable fatal, but that is all I 

Test script:
$client=@new \SoapClient('garbage',array('exceptions'=>FALSE));
echo 'OK';

Expected result:
We should see "OK",

Actual result:
If we use register_shutdown_function to display the contents of error_get_last(), 
we get:

    [type] => 1
    [message] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'garbage' : failed 
to load external entity "garbage"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-11 12:20 UTC] chris at kotret dot yourweb dot de
also: if Exceptions are set to true there should be no error thrown at all but an Exception. This is a serious bug with no possible workaround.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Sep 26 00:01:25 2023 UTC