|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37355 SOAP uses deprecated __call method by default
Submitted: 2006-05-08 03:23 UTC Modified: 2006-05-25 09:37 UTC
From: daniel dot oconnor at gmail dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.1.4 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: daniel dot oconnor at gmail dot com
New email:
PHP Version: OS:


 [2006-05-08 03:23 UTC] daniel dot oconnor at gmail dot com
5.1.4 appears to be still using __call instead of __soapCall, in at least one place this causes exceptions without error codes to be thrown.

Reproduce code:
$wsdl = '';

$client = new SoapClient($wsdl);
$result = $client->login(array("username" => "fake", "password" => "user"));

Expected result:
No SoapFaults thrown, or a SoapFault is thrown with a meaningful error.

Actual result:
---------- php ----------

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] SoapFault::__construct() [<a href='function.SoapFault---construct'>function.SoapFault---construct</a>]: Invalid parameters. Invalid fault code. in C:\vx\tests\unit\soap\LoginTest.php:42
Stack trace:
#0 [internal function]: SoapClient->__call('login', Array)
#1 C:\vx\tests\unit\soap\LoginTest.php(42): SoapClient->login(Array)
#2 {main}
  thrown in C:\vx\tests\unit\soap\LoginTest.php on line 42

Output completed (0 sec consumed) - Normal Termination


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-25 09:37 UTC]
This is not a bug.

__call() is a magic function that used for method call overloading. So when you call login() PHP calls __call().

SoapClient::__call() and SoapClient::__soapCall() are different names of the same function.

The fault that you have is generated by server. Probably server tries send a SoapFault, but does somthing wrong. It calls SoapFault constructor with wrong arguments.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Jan 29 14:03:43 2023 UTC