Bug in PEAR::SOAP header faults?
| From: | Christopher Lewis | Date: | Tue, 07 Oct 2003 18:16:35 +0000 |
| Subject: | Bug in PEAR::SOAP header faults? | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1106@lists.php.net to get a copy of this message | ||
Hi Shane and everyone,
I've come across what looks like a bug in the error handling for SOAP header faults. I'm using 0.8RC2; this might be fixed in CVS already. Instead of returning the actual header fault returned by the header function, a misnamed variable was causing an general empty fault message to be returned instead.
I fixed it by replacing $method_response with $hr on line 338 of Server.php.
Thanks!
-Chris
Here is the diff of Server.php:
*** Server.php.bak Tue Oct 7 14:10:36 2003--- Server.php Tue Oct 7 14:11:38 2003 *************** *** 335,341 ****
$hr =& $this->callMethod($header_method, $header_data);
# if they return a fault, then it's all over!
if (PEAR::isError($hr)) {
! $this->_raiseSoapFault($method_response);
return null;
}
$header_results[] = array_shift($this->buildResult($hr, $this->return_type, $header_method, $header_val->namespace));
--- 335,341 ----
$hr =& $this->callMethod($header_method, $header_data);
# if they return a fault, then it's all over!
if (PEAR::isError($hr)) {
! $this->_raiseSoapFault($hr);
return null;
}
$header_results[] = array_shift($this->buildResult($hr, $this->return_type, $header_method, $header_val->namespace));