Bug #66503 [Com]: Fatal error in SoapClient isn't really fatal
| From: | gordon dot mcvey at ntlworld dot com | Date: | Thu, 16 Jan 2014 21:56:41 +0000 |
| Subject: | Bug #66503 [Com]: Fatal error in SoapClient isn't really fatal | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183852@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66503&edit=1
ID: 66503
Comment by: gordon dot mcvey at ntlworld dot com
Reported by: gordon dot mcvey at ntlworld dot com
Summary: Fatal error in SoapClient isn't really fatal
Status: Open
Type: Bug
Package: SOAP related
Operating System: Ubuntu Linux, Mac OSX Lion
PHP Version: 5.4.24
Block user comment: N
Private report: N
New Comment:
PHP 5.4.6-1ubuntu1.5 (cli) (built: Dec 12 2013 04:39:44) Copyright (c) 1997-2012 The PHP Group Zend
Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.2.1, Copyright (c)
2002-2012, by Derick Rethans
I also tested this on my home machine with similar results.
PHP 5.5.5 (cli) (built: Oct 20 2013 23:15:05) Copyright (c) 1997-2013 The PHP Group Zend Engine
v2.5.0, Copyright (c) 1998-2013 Zend Technologies with Xdebug v2.2.2, Copyright (c) 2002-2013, by
Derick Rethans
Previous Comments:
------------------------------------------------------------------------
[2014-01-16 21:53:23] gordon dot mcvey at ntlworld dot com
Description:
------------
Dealing with the SoapClient in PHP inside a try block produces an unexpected result when a failure
to connect occurs. A fatal error will be logged or displayed (depending on error_reporting,
display_errors and error logging settings) but the script will continue to execute.
Test script:
---------------
<?php
echo "start\n";
try {
$test = new SoapClient ('http://www.example.com/');
} catch (Exception $e) {
echo "Caught exception\n";
}
echo "end\n";
Expected result:
----------------
Either
======
start
Caught exception
end
Or
======
start
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/' : Extra content at the end of
the document
in soapfail.php on line 6
Actual result:
--------------
start
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/' : Extra content at the end of
the document
in soapfail.php on line 6
Caught exception
end
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66503&edit=1