Skip to content

Commit

Permalink
Fix error in server class: undefined function php_xmlrpc_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Oct 1, 2016
1 parent 6a87bde commit e7b08a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,8 @@ protected function execute($req, $params = null, $paramTypes = null)
} else {
// functions using EPI api should NOT return resp objects,
// so make sure we encode the return type correctly
$r = new Response(php_xmlrpc_encode($r, array('extension_api')));
$encoder = new Encoder();
$r = new Response($encoder->encode($r, array('extension_api')));
}
} else {
$r = call_user_func_array($func, $params);
Expand All @@ -685,7 +686,8 @@ protected function execute($req, $params = null, $paramTypes = null)
if (!is_a($r, '\PhpXmlRpc\Response')) {
// what should we assume here about automatic encoding of datetimes
// and php classes instances???
$r = new Response(php_xmlrpc_encode($r, $this->phpvals_encoding_options));
$encoder = new Encoder();
$r = new Response($encoder->encode($r, $this->phpvals_encoding_options));
}
}
} catch (\Exception $e) {
Expand Down

0 comments on commit e7b08a7

Please sign in to comment.