Bug #62811 [Opn->Csd]: WSDL load failure indicates (but does not actually cause) fatal error

From: Date: Fri, 23 Mar 2018 11:40:07 +0000
Subject: Bug #62811 [Opn->Csd]: WSDL load failure indicates (but does not actually cause) fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214449@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62811&edit=1 ID: 62811 Updated by: nikic@php.net Reported by: eric at wepay dot com Summary: WSDL load failure indicates (but does not actually cause) fatal error -Status: Open +Status: Closed Type: Bug Package: SOAP related Operating System: OS X, CentOS PHP Version: 5.3.15 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: This has been fixed by bug #70469 in 7.1.14/7.2.2. Previous Comments: ------------------------------------------------------------------------ [2013-08-20 14:10:50] azhdanov at terricone dot com This bug is still valid in PHP 5.4.9. Enabling/disabling xdebug doesn't work. ------------------------------------------------------------------------ [2012-08-13 16:53:37] eric at wepay dot com updating title to better reflect the problem ------------------------------------------------------------------------ [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

« previous php.bugs (#214449) next »