|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74089 SoapClient doesn't throw exceptions
Submitted: 2017-02-13 01:54 UTC Modified: 2017-02-13 03:19 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: luisfcandido at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 7.1.1 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
35 + 22 = ?
Subscribe to this entry?

 [2017-02-13 01:54 UTC] luisfcandido at gmail dot com
When calling a wsdl function, with invalid/missing parameters, SoapClient triggers  a fatal error, and kills the script, instead of throwing a exception.

Test script:
	echo "start " . phpversion() . "</br>";
		$a = new SoapClient($url, array("exceptions" => true));
	catch(SoapFault $e)
		echo "soapFault {$e->getMessage()}</br>";
		$a->runReport(["userID" => $user, "password" =>  $pass]);
	catch(soapFault $e)
		echo "soapFault: {$e->getMessage()}</br>";
	echo "end\n";

Expected result:
start 7.1.1
soapFault: SOAP-ERROR: Encoding: object has no 'reportRequest' property

Actual result:
PHP Fatal error:  SOAP-ERROR: Encoding: object has no 'reportRequest' property


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Apr 04 09:01:23 2020 UTC