php.net |  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: -
Votes:18
Avg. Score:4.6 ± 0.6
Reproduced:18 of 18 (100.0%)
Same Version:8 (44.4%)
Same OS:13 (72.2%)
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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xfra35 at gmail dot com
New email:
PHP Version: OS:

 

 [2013-09-28 07:21 UTC] xfra35 at gmail dot com
Description:
------------
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. 
https://bugs.php.net/bug.php?id=47584#1283456233:
> [2010-09-02 19:37 UTC] rasmus@php.net
> 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 
see.


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:

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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.

Chris
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 02:01:26 2019 UTC