Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.4

Bug #11476 Wrong usage of options in SOAP5 container: _validateOptions and _setDefaults
Submitted: 2007-06-28 21:27 UTC
From: nyuwec Assigned: aashley
Status: Closed Package: Auth (version 1.5.2)
PHP Version: 5.2.1 OS: MacOSX
Roadmaps: 1.5.3    
Subscription  


 [2007-06-28 21:27 UTC] nyuwec (Köles Mihály)
Description: ------------ I have tried the SOAP5 container, but I couldn't send any SOAP request, because of the _validateOptions function. I have debugged the code and it seems to me, that the constructor writes the given options array into _options, but the _validateOptions function checks the options, so it returns false always! I don't know the right solution, but i have made some modifications to the SOAP5 container class: function _validateOptions() { if ( ( is_null($this->_options['wsdl']) && is_null($this->_options['location']) && is_null($this->_options['uri'])) || ( is_null($this->_options['wsdl']) && ( is_null($this->_options['location']) || is_null($this->_options['uri'])))) { return PEAR::raiseError('Either a WSDL file or a location/uri pair must be specified.'); } if (is_null($this->_options['method'])) { return PEAR::raiseError('A method to call on the soap service must be specified.'); } return true; } function _setDefaults() { $this->_options['wsdl'] = null; $this->_options['location'] = null; $this->_options['uri'] = null; $this->_options['method'] = null; $this->_options['usernamefield'] = 'username'; $this->_options['passwordfield'] = 'password'; $this->_options['matchpasswords'] = true; }

Comments

 [2007-06-28 22:05 UTC] nyuwec (Köles Mihály)
I was not clear enough: with the modified _validateOptions and _setDefaults function SOAP calls are working.
 [2007-07-02 01:38 UTC] aashley (Adam Ashley)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Bit better description in the future would be helpful. A simple '_validateOptions() and _setDefaults use $this->options instead of $this->_options' would of gotten the meaning of the bug report across much quicker. Also with patches please supply them in unified diff format (diff -u) in the future. They are easier to understand at a quick glance.
 [2007-07-02 07:45 UTC] nyuwec (Köles Mihály)
Thanks for the quick answer and I will keep Your comments in my mind for the future!