MDL-52718 block_community: Send XML-RPC request correctly
mnet has its own separate XML-RPC implementation which supports introspection. So even though we were sending incorrectly formatted parameters, our previous XML-RPC implementation could work out how to mangle the parameters to be correct. Introspection is not a part of the XML-RPC specification and we should not rely on it. Our current XML-RPC client/server implementation does not support it either. Therefore we should always send data in the expected format.
This commit is contained in:
@@ -198,7 +198,7 @@ if (optional_param('executesearch', 0, PARAM_INT) and confirm_sesskey()) {
|
||||
require_once($CFG->dirroot . "/webservice/xmlrpc/lib.php");
|
||||
$xmlrpcclient = new webservice_xmlrpc_client($serverurl, $token);
|
||||
try {
|
||||
$result = $xmlrpcclient->call($function, $params);
|
||||
$result = $xmlrpcclient->call($function, array_values($params));
|
||||
$courses = $result['courses'];
|
||||
$coursetotal = $result['coursetotal'];
|
||||
} catch (Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user