cvs: pearweb /include xmlrpc-methods.php
| From: | Stig Bakken | Date: | Sun, 28 Apr 2002 06:49:50 +0000 |
| Subject: | cvs: pearweb /include xmlrpc-methods.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3589@lists.php.net to get a copy of this message | ||
ssb Sun Apr 28 02:49:50 2002 EDT
Modified files:
/pearweb/include xmlrpc-methods.php
Log:
* fixed problem with booleans in method signatures (xmlrpc_get_type
returns "boolean", not "bool")
Index: pearweb/include/xmlrpc-methods.php
diff -u pearweb/include/xmlrpc-methods.php:1.9 pearweb/include/xmlrpc-methods.php:1.10
--- pearweb/include/xmlrpc-methods.php:1.9 Wed Nov 7 05:42:39 2001
+++ pearweb/include/xmlrpc-methods.php Sun Apr 28 02:49:50 2002
@@ -42,7 +42,7 @@
{
global $xmlrpc_method_index;
if (empty($xmlrpc_method_index["index"][$method_name])) {
- error_log("pear xmlrpc unknown method: $method_name");
+ error_log("pear xmlrpc: unknown method: $method_name");
return false; // XXX FAULT
}
$type_key = "";
@@ -50,17 +50,25 @@
if ($i > 0) {
$type_key .= ",";
}
- $type_key .= xmlrpc_get_type($params[$i]);
+ $tmp = xmlrpc_get_type($params[$i]);
+ if ($tmp == 'boolean') {
+ $type_key .= 'bool';
+ } else {
+ $type_key .= $tmp;
+ }
}
if (!isset($xmlrpc_method_index["index"][$method_name][$type_key])) {
- error_log("pear xmlrpc no signature found for $method_name($type_key)");
- return false; // XXX FAULT
+ error_log("pear xmlrpc: no signature found for $method_name($type_key)");
+ PEAR::raiseError("no signature found for $method_name($type_key)", -1,
+ PEAR_ERROR_TRIGGER, E_USER_WARNING, $userinfo);
+ return false;
}
$auth = $xmlrpc_method_index["auth"][$method_name];
if ($auth != "all") {
auth_require($auth == "admin");
}
$function = $xmlrpc_method_index["index"][$method_name][$type_key];
+ error_log("pearweb xmlrpc: calling $function", 0);
if (strstr($function, "::")) {
list($class, $method) = explode("::", $function);
// XXX deprecated syntax