Bug #74089 [Opn->Fbk]: SoapClient doesn't throw exceptions
Edit report at https://bugs.php.net/bug.php?id=74089&edit=1
ID: 74089
Updated by: cmb@php.net
Reported by: luisfcandido at gmail dot com
Summary: SoapClient doesn't throw exceptions
-Status: Open
+Status: Feedback
Type: Bug
Package: SOAP related
Operating System: Windows 7
PHP Version: 7.1.1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Please provide (a link to) the WSDL.
Previous Comments:
------------------------------------------------------------------------
[2017-02-13 01:54:58] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74089&edit=1
Thread (3 messages)