php.net |  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
Votes:3
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-02-13 01:54 UTC] luisfcandido at gmail dot com
Description:
------------
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>";
	try
	{
		$a = new SoapClient($url, array("exceptions" => true));
	}
	catch(SoapFault $e)
	{
		echo "soapFault {$e->getMessage()}</br>";
	}
	try
	{
		$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
end

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 16:01:26 2019 UTC