Edit report at http://bugs.php.net/bug.php?id=47581&edit=1
ID: 47581 Updated by: fel...@php.net Reported by: starson dot hochschild at mtginfo dot com Summary: Calling __construct from an extended SoapClient class via variable broken -Status: Open +Status: Feedback Type: Bug Package: SOAP related Operating System: Linux RedHat Enterprise V4 PHP Version: 5.2.9 New Comment: Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-03-05 22:38:54] starson dot hochschild at mtginfo dot com public function misSoap should be public function __construct ------------------------------------------------------------------------ [2009-03-05 22:33:44] starson dot hochschild at mtginfo dot com Description: ------------ I just upgraded from 5.1.6 to 5.2.9. Calling __construct from an extended SoapClient class via variable used to work but this is no longer the case. Somehow it gets picked up by __call now. Calling __construct from an extended SoapClient class explicitly still works. Calling SoapClient from an extended SoapClient class via variable still works. I did not include an example for this, though. This is definitely not a show-stopper but it would be nice to have consistency. I haven't noticed this with any other classes, but then again using a variable to call __construct isn't exactly common. Reproduce code: --------------- <?php class SoapClientExplicit extends SoapClient { public function misSoap($wsdl, $options = array()) { parent::__construct($wsdl, $options); } } class SoapClientVariable extends SoapClient { public function misSoap($wsdl, $options = array()) { $function = __FUNCTION__; parent::$function($wsdl, $options); } } echo __LINE__."\n"; $sce = new SoapClientExplicit('http://example.com/ns/func?wsdl'); echo __LINE__."\n"; $scv = new SoapClientVariable('http://example.com/ns/func?wsdl'); echo __LINE__."\n"; ?> Expected result: ---------------- 13 15 17 Actual result: -------------- 13 15 Fatal error: Uncaught SoapFault exception: [Client] Error finding "uri" property in /path/to/script.php:10 Stack trace: #0 [internal function]: SoapClient->__call('__construct', Array) #1 /path/to/script.php(10): SoapClient->__construct('http://example...', Array) #2 /path/to/script.php(16): SoapClientVariable->__construct('http://example...', Array) #3 {main} thrown in /path/to/script.php on line 10 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=47581&edit=1