Edit report at https://bugs.php.net/bug.php?id=62811&edit=1
ID: 62811 User updated by: eric at wepay dot com Reported by: 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 Status: Open Type: Bug Package: SOAP related Operating System: OS X, CentOS PHP Version: 5.3.15 Block user comment: N Private report: N New Comment: updating title to better reflect the problem Previous Comments: ------------------------------------------------------------------------ [2012-08-13 16:52:28] eric at wepay dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62811&edit=1