|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-08-13 16:53 UTC] eric at wepay dot com
[2012-08-13 16:53 UTC] eric at wepay dot com
-Summary: WSDL load failure generates fatal, non-catchable
error
+Summary: WSDL load failure indicates (but does not actually
cause) fatal error
[2013-08-20 14:10 UTC] azhdanov at terricone dot com
[2018-03-23 11:40 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2018-03-23 11:40 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
Description: ------------ If a WSDL file is unavailable when running SoapClient::__construct(), PHP indicates a fatal error to STDERR yet continues to process the script. This causes erroneous errors to end up in logs and creates a lot of misdirection around whether or not we have legitimate problems. It should continue to generate the SoapFault which contains approximately the same message, but should not indicate the fatal error. Test script: --------------- <?php set_error_handler(function($a,$b,$c,$d) { throw new ErrorException($b,0,$a,$c,$d); }, -1); try { new SoapClient('https://example.com/foo.bar'); } catch (SoapFault $e) { echo "SoapFault\n"; } catch (ErrorException $e) { echo "ErrorException\n"; } catch (Exception $e) { echo "Exception\n"; } echo "I survived\n"; register_shutdown_function(function() { echo 'Shutdown'; }); Expected result: ---------------- STDERR: (nothing) STDOUT: SoapFault I survived Shutdown Actual result: -------------- STDERR: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://example.com/foo.bar' : failed to load external entity "https://example.com/foo.bar" in /private/var/folders/w2/rlynjnwx7zdfzgr2m_h6bt8m0000gn/T/untitled_4d..php on line 4 STDOUT: SoapFault I survived Shutdown