git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a87bde
)
Fix error in server class: undefined function php_xmlrpc_encode
4.1.1
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 1 Oct 2016 12:29:37 +0000
(13:29 +0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 1 Oct 2016 12:29:37 +0000
(13:29 +0100)
src/Server.php
patch
|
blob
|
history
diff --git
a/src/Server.php
b/src/Server.php
index
1a52fe6
..
ab17168
100644
(file)
--- a/
src/Server.php
+++ b/
src/Server.php
@@
-675,7
+675,8
@@
class Server
} else {
// functions using EPI api should NOT return resp objects,
// so make sure we encode the return type correctly
} 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);
}
} else {
$r = call_user_func_array($func, $params);
@@
-685,7
+686,8
@@
class Server
if (!is_a($r, '\PhpXmlRpc\Response')) {
// what should we assume here about automatic encoding of datetimes
// and php classes instances???
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) {
}
}
} catch (\Exception $e) {