- if($call->kindOf() != 'struct')
- {
- return _xmlrpcs_multicall_error('notstruct');
- }
- $methName = @$call->structmem('methodName');
- if(!$methName)
- {
- return _xmlrpcs_multicall_error('nomethod');
- }
- if($methName->kindOf() != 'scalar' || $methName->scalartyp() != 'string')
- {
- return _xmlrpcs_multicall_error('notstring');
- }
- if($methName->scalarval() == 'system.multicall')
- {
- return _xmlrpcs_multicall_error('recursion');
- }
-
- $params = @$call->structmem('params');
- if(!$params)
- {
- return _xmlrpcs_multicall_error('noparams');
- }
- if($params->kindOf() != 'array')
- {
- return _xmlrpcs_multicall_error('notarray');
- }
- $numParams = $params->arraysize();
-
- $msg = new Request($methName->scalarval());
- for($i = 0; $i < $numParams; $i++)
- {
- if(!$msg->addParam($params->arraymem($i)))
- {
- $i++;
- return _xmlrpcs_multicall_error(new Response(0,
+ if ($call->kindOf() != 'struct') {
+ return static::_xmlrpcs_multicall_error('notstruct');
+ }
+ $methName = @$call['methodName'];
+ if (!$methName) {
+ return static::_xmlrpcs_multicall_error('nomethod');
+ }
+ if ($methName->kindOf() != 'scalar' || $methName->scalartyp() != 'string') {
+ return static::_xmlrpcs_multicall_error('notstring');
+ }
+ if ($methName->scalarval() == 'system.multicall') {
+ return static::_xmlrpcs_multicall_error('recursion');
+ }
+
+ $params = @$call['params'];
+ if (!$params) {
+ return static::_xmlrpcs_multicall_error('noparams');
+ }
+ if ($params->kindOf() != 'array') {
+ return static::_xmlrpcs_multicall_error('notarray');
+ }
+
+ $req = new Request($methName->scalarval());
+ foreach($params as $i => $param) {
+ if (!$req->addParam($param)) {
+ $i++; // for error message, we count params from 1
+ return static::_xmlrpcs_multicall_error(new Response(0,