| @@ 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 |
|
| @@ 1114-1123 (lines=10) @@ | ||
| 1111 | } else { |
|
| 1112 | // either system.multicall is unsupported by server, |
|
| 1113 | // or call failed for some other reason. |
|
| 1114 | if ($fallback) { |
|
| 1115 | // Don't try it next time... |
|
| 1116 | $this->no_multicall = true; |
|
| 1117 | } else { |
|
| 1118 | if (is_a($results, '\PhpXmlRpc\Response')) { |
|
| 1119 | $result = $results; |
|
| 1120 | } else { |
|
| 1121 | $result = new Response(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], PhpXmlRpc::$xmlrpcstr['multicall_error']); |
|
| 1122 | } |
|
| 1123 | } |
|
| 1124 | } |
|
| 1125 | } else { |
|
| 1126 | // override fallback, in case careless user tries to do two |
|