Fix: php_2_xmlrpc_type is not a public function anymore
[plcapi.git] / src / Server.php
index 40afa9b..2280847 100644 (file)
@@ -457,8 +457,7 @@ class Server
             if (!in_array($reqEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($data)) {
                 if ($reqEncoding == 'ISO-8859-1') {
                     $data = utf8_encode($data);
-                }
-                else {
+                } else {
                     if (extension_loaded('mbstring')) {
                         $data = mb_convert_encoding($data, 'UTF-8', $reqEncoding);
                     } else {
@@ -931,8 +930,9 @@ class Server
         // base64 or datetime values, but they will be listed as strings here...
         $numParams = count($call['params']);
         $pt = array();
+        $wrapper = new Wrapper();
         foreach ($call['params'] as $val) {
-            $pt[] = php_2_xmlrpc_type(gettype($val));
+            $pt[] = $wrapper->php_2_xmlrpc_type(gettype($val));
         }
 
         $result = $server->execute($call['methodName'], $call['params'], $pt);