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:19
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC