[SOAP] set_error_handler() in callMethod()
| From: | Pavel Marenyuk | Date: | Thu, 26 Jun 2003 17:00:42 +0000 |
| Subject: | [SOAP] set_error_handler() in callMethod() | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-750@lists.php.net to get a copy of this message | ||
Hello.
SOAP_Server->callMethod() sets own error handler on execution,
but unset() on variable, declared as global [bug] drops results
from error handler function.
I hope my patch will be helpful.
--- Server.php.orig 2003-06-26 16:23:01.000000000 +0300
+++ Server.php 2003-06-26 16:23:45.000000000 +0300
@@ -220,7 +220,7 @@
function &callMethod($methodname, &$args) {
global $soap_server_fault;
- unset($soap_server_fault);
+ $soap_server_fault=null;
if ($this->callHandler) {
return @call_user_func_array($this->callHandler,array($methodname,$args));
}
@@ -241,7 +241,7 @@
}
}
restore_error_handler();
- return isset($soap_server_fault)?$soap_server_fault:$ret;
+ return ($soap_server_fault===null)?$ret:$soap_server_fault;
}
// create soap_val object w/ return values from method, use method signature to determine type
--
Pavel pavlomr@hotmail.com