#45059 [NEW]: incorrect signature for __call() method
| From: | dennis at born05 dot nl | Date: | Wed, 21 May 2008 15:12:55 +0000 |
| Subject: | #45059 [NEW]: incorrect signature for __call() method | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-125161@lists.php.net to get a copy of this message | ||
From: dennis at born05 dot nl
Operating system: Windows XP Pro SP2
PHP version: 5.2.6
PHP Bug Type: *Extensibility Functions
Bug description: incorrect signature for __call() method
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 bug report at http://bugs.php.net/?id=45059&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45059&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45059&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45059&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45059&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45059&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45059&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45059&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45059&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45059&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45059&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45059&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45059&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45059&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45059&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45059&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45059&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45059&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45059&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45059&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45059&r=mysqlcfg