Skip to content

Commit

Permalink
Oops last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Mar 26, 2015
1 parent 7181e95 commit 5c1aaa6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Wrapper.php
Expand Up @@ -529,7 +529,7 @@ public function wrap_xmlrpc_method($client, $methodname, $extra_options = 0, $ti

$msgclass = $namespace . 'Request';
$valclass = $namespace . 'Value';
$decodefunc = 'new ' . $namespace . 'Encoder()->decode';
$decoderClass = $namespace . 'Encoder';

$msg = new $msgclass('system.methodSignature');
$msg->addparam(new $valclass($methodname));
Expand All @@ -542,7 +542,8 @@ public function wrap_xmlrpc_method($client, $methodname, $extra_options = 0, $ti
} else {
$msig = $response->value();
if ($client->return_type != 'phpvals') {
$msig = $decodefunc($msig);
$decoder = new $decoderClass();
$msig = $decoder->decode($msig);
}
if (!is_array($msig) || count($msig) <= $signum) {
error_log('XML-RPC: could not retrieve method signature nr.' . $signum . ' from remote server for method ' . $methodname);
Expand Down Expand Up @@ -630,7 +631,7 @@ public function wrap_xmlrpc_server($client, $extra_options = array())

$msgclass = $namespace . 'Request';
//$valclass = $prefix.'val';
$decodefunc = 'new ' . $namespace . 'Encoder()->decode';
$decoderClass = $namespace . 'Encoder';

$msg = new $msgclass('system.listMethods');
$response = $client->send($msg, $timeout, $protocol);
Expand All @@ -641,7 +642,8 @@ public function wrap_xmlrpc_server($client, $extra_options = array())
} else {
$mlist = $response->value();
if ($client->return_type != 'phpvals') {
$mlist = $decodefunc($mlist);
$decoder = new $decoderClass();
$mlist = $decoder->decode($mlist);
}
if (!is_array($mlist) || !count($mlist)) {
error_log('XML-RPC: could not retrieve meaningful method list from remote server');
Expand Down

0 comments on commit 5c1aaa6

Please sign in to comment.