php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73451 fatal errors instead exceptions
Submitted: 2016-11-03 11:10 UTC Modified: 2018-03-23 11:46 UTC
Votes:5
Avg. Score:4.4 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: spam2 at rhsoft dot net Assigned: nikic (profile)
Status: Closed Package: SOAP related
PHP Version: 7.0.12 OS: Linux
Private report: No CVE-ID: None
 [2016-11-03 11:10 UTC] spam2 at rhsoft dot net
Description:
------------
it would be *really* nice if such errors could be an exception to have the capability for proper error handling inside the application

[03-Nov-2016 11:55:35 Europe/Vienna] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://**.**.**.**:8731/WWTSTicketService/?wsdl' : failed to load external entity "http://**.**.**.**:8731/WWTSTicketService/?wsdl"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-08 10:03 UTC] spam2 at rhsoft dot net
damend even try/catch with "Throwable" don't work and it's ridiculous have a hard stop because some 3rd party data is not perfectly encoded

[08-Apr-2017 02:10:28 Europe/Vienna] PHP Fatal error:  SOAP-ERROR: Encoding: string 'g\xf6...' is not a valid utf-8 string in *** on line 993

try
{
}
catch(Throwable $exception)
{
}
 [2017-04-08 10:36 UTC] nikic@php.net
Looks like fatal erros in SOAP were for some reason not part of https://wiki.php.net/rfc/throw_error_in_extensions -- probably because SOAP uses non-standard macros to generate them.
 [2018-03-23 11:46 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2018-03-23 11:46 UTC] nikic@php.net
This should be fixed in 7.1.14 / 7.2.2 as part of bug #70469.

Soap error handling is still a huge mess, but at least this specific problem (fatal error thrown by SoapClient if exception mode is enabled) shouldn't occur anymore.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 22:01:29 2024 UTC