Bug #77601 [NEW]: WSDL parsing issue throws a fatal error instead of a SOAPFault exception

From: Date: Mon, 11 Feb 2019 09:26:53 +0000
Subject: Bug #77601 [NEW]: WSDL parsing issue throws a fatal error instead of a SOAPFault exception
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219493@lists.php.net to get a copy of this message
From: nikstar at ukr dot net Operating system: Windows 7 PHP version: 7.3.2 Package: SOAP related Bug Type: Bug Bug description:WSDL parsing issue throws a fatal error instead of a SOAPFault exception Description: ------------ Subclassing the SoapClient class and wrapping the call to the parent constructor will throw a fatal error even when wrapped in a try...catch(\Throwable $t). With PHP 7.3.2 try...catch(\Throwable $t) being a convenient method of adding fault tolerance and graceful degradation -- it is therefore very frustrating when a WSDL PARSE issue is encountered that an UNCATCHABLE script exiting fatal error is issued. Test script: --------------- <?php class SoapAgent extends \SoapClient { public function __construct(string $wsdl) { try { parent::__construct($wsdl); echo 'Success!' . PHP_EOL; } catch (\Throwable $t) { var_dump($t); } } } $client = new SoapAgent('test'); Expected result: ---------------- var_dump() of the Throwable object. Actual result: -------------- Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'test' : failed to load external entity "test" Process finished with exit code 255 -- Edit bug report at https://bugs.php.net/bug.php?id=77601&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77601&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77601&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77601&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77601&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77601&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77601&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77601&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77601&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77601&r=support Expected behavior: https://bugs.php.net/fix.php?id=77601&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77601&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77601&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77601&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77601&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77601&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77601&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77601&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77601&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77601&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77601&r=mysqlcfg

« previous php.bugs (#219493) next »