#45059 [Opn->Bgs]: incorrect signature for __call() method
ID: 45059
Updated by: felipe@php.net
Reported By: dennis at born05 dot nl
-Status: Open
+Status: Bogus
Bug Type: SOAP related
Operating System: Windows XP Pro SP2
PHP Version: 5.2.6
New Comment:
That __call function isn't the magic method, maybe that has been the
reason to become it obsolete.
Previous Comments:
------------------------------------------------------------------------
[2008-05-22 12:04:46] dennis at born05 dot nl
OK, I have upgraded to the latest version -> 5.2.6
It displays the exact same behaviour as does PHP 5.2.5.
------------------------------------------------------------------------
[2008-05-22 08:33:21] jani@php.net
You can't find 5.2.5 on the list since latest version is 5.2.6, if you
don't have that -> upgrade first.
------------------------------------------------------------------------
[2008-05-21 15:12:55] dennis at born05 dot nl
Description:
------------
Actually, I am using PHP version 5.2.5, but I couldn't find it in the
list.
The current implementation of the __call() method in the SoapClient
class is as follows: mixed __call ( string $function_name , array
$arguments [, array $options [, array $input_headers [, array
$output_headers ]]] ) (as per the documentation)
While the default 'magic method' __call() is defined as: __call (
string $name , array $arguments )
Now I'm extending the SoapClient class and want to overload the
__call() method, but I'm unable to do so without raising errors (with
error_reporting (E_ALL | E_STRICT) )
There are a couple of different things here:
1. Implement the __call() method like the default method. This raises
the following error: Strict Standards: Declaration of
ExtendedSoapClient::__call() should be compatible with that of
SoapClient::__call() in C:\Program
Files\xampp\htdocs\CodeBase\soaptest\ExtendedSoapClient.class.inc.php on
line 9 (line 9 is closing bracket of ExtendedSoapClient)
2. So I implemented as documented for the SoapClient::__call(). This
raises the following error: Fatal error: Method
ExtendedSoapClient::__call() must take exactly 2 arguments in C:\Program
Files\xampp\htdocs\CodeBase\soaptest\ExtendedSoapClient.class.inc.php on
line 7
This behaviour only exhibits when ExtendedSoapClient resides in a
seperate file. When the class definition is in the same file as the
calling code it still raises the E_FATAL, but it won't raise the
E_STRICT anymore.
Reproduce code:
---------------
I have put up a page which shows a couple of different code samples
which illustrate what happens.
http://db.cover05.nl/php_bug
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45059&edit=1
Thread (4 messages)