Index: includes/xmlrpc.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/xmlrpc.inc,v
retrieving revision 1.61
diff -u -p -r1.61 xmlrpc.inc
--- includes/xmlrpc.inc	24 Aug 2009 00:14:19 -0000	1.61
+++ includes/xmlrpc.inc	19 Dec 2009 08:52:15 -0000
@@ -430,13 +430,16 @@ function xmlrpc_base64_get_xml($xmlrpc_b
  *     An array of call arrays. Each call array follows the pattern of the single
  *     request: method name followed by the arguments to the method.
  * @return
- *   For one request:
- *     Either the return value of the method on success, or FALSE.
- *     If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
- *   For multiple requests:
- *     An array of results. Each result will either be the result
- *     returned by the method called, or an xmlrpc_error object if the call
- *     failed. See xmlrpc_error().
+     Either the return value of the method on success, or FALSE.
+ *   If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
+ *   For a non-multicall request:
+ *     The result just as if this had been a local function call.
+ *   For a multicall request:
+ *     An array of results. Each result will either be a one-element array
+ *     containing the result returned by the method called, or an xmlrpc_error
+ *     object if the call failed.
+ *
+ * @see xmlrpc_error()
  */
 function _xmlrpc() {
   $args = func_get_args();
@@ -475,8 +478,23 @@ function _xmlrpc() {
     xmlrpc_error($message->fault_code, $message->fault_string);
     return FALSE;
   }
-  // Message must be OK
-  return $message->params[0];
+  // We now know that the message is well-formed and a non-fault result.
+  if ($method == 'system.multicall') {
+    // Return per-method results or error objects.
+    $return = array();
+    foreach ($message->params[0] as $result) {
+      if (array_keys($result) == array(0)) {
+        $return[] = $result[0];
+      }
+      else {
+        $return[] = xmlrpc_error($result['faultCode'], $result['faultString']);
+      }
+    }
+  }
+  else {
+    $return = $message->params[0];
+  }
+  return $return;
 }
 
 /**
Index: includes/xmlrpcs.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/xmlrpcs.inc,v
retrieving revision 1.34
diff -u -p -r1.34 xmlrpcs.inc
--- includes/xmlrpcs.inc	2 Dec 2009 00:31:47 -0000	1.34
+++ includes/xmlrpcs.inc	19 Dec 2009 08:52:15 -0000
@@ -235,7 +235,7 @@ function xmlrpc_server_multicall($method
       );
     }
     else {
-      $return[] = $result;
+      $return[] = array($result);
     }
   }
   return $return;
