| @@ 652-660 (lines=9) @@ | ||
| 649 | } |
|
| 650 | if (!is_a($r, 'PhpXmlRpc\Response')) { |
|
| 651 | error_log("XML-RPC: " . __METHOD__ . ": function '$funcName' registered as method handler does not return an xmlrpc response object but a " . gettype($r)); |
|
| 652 | if (is_a($r, 'PhpXmlRpc\Value')) { |
|
| 653 | $r = new Response($r); |
|
| 654 | } else { |
|
| 655 | $r = new Response( |
|
| 656 | 0, |
|
| 657 | PhpXmlRpc::$xmlrpcerr['server_error'], |
|
| 658 | PhpXmlRpc::$xmlrpcstr['server_error'] . ": function does not return xmlrpc response object" |
|
| 659 | ); |
|
| 660 | } |
|
| 661 | } |
|
| 662 | } else { |
|
| 663 | // call a 'plain php' function |
|
| @@ 1098-1107 (lines=10) @@ | ||
| 1095 | } else { |
|
| 1096 | // either system.multicall is unsupported by server, |
|
| 1097 | // or call failed for some other reason. |
|
| 1098 | if ($fallback) { |
|
| 1099 | // Don't try it next time... |
|
| 1100 | $this->no_multicall = true; |
|
| 1101 | } else { |
|
| 1102 | if (is_a($results, '\PhpXmlRpc\Response')) { |
|
| 1103 | $result = $results; |
|
| 1104 | } else { |
|
| 1105 | $result = new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], PhpXmlRpc::$xmlrpcstr['multicall_error']); |
|
| 1106 | } |
|
| 1107 | } |
|
| 1108 | } |
|
| 1109 | } else { |
|
| 1110 | // override fallback, in case careless user tries to do two |
|