X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fxmlrpc_wrappers.inc;h=4331c360103e3dac5e6664a999d75eeea23690b6;hb=82b80c30c362ae96096f8be6a888a9fc665e3dbe;hp=3c2390a21506e23f139209e6e4f50812aeb466f3;hpb=25cd0af7fd7f07459a9448be6b6454d0afde4fff;p=plcapi.git diff --git a/lib/xmlrpc_wrappers.inc b/lib/xmlrpc_wrappers.inc index 3c2390a..4331c36 100644 --- a/lib/xmlrpc_wrappers.inc +++ b/lib/xmlrpc_wrappers.inc @@ -87,7 +87,7 @@ function wrap_php_class($className, $extraOptions=array()) * @see PhpXmlRpc\Wrapper::wrapXmlrpcMethod * @param xmlrpc_client $client * @param string $methodName - * @param int|array $extraOptions the usage of an int as signature number is deprecated, use an option in $extraOptions + * @param int|array $extraOptions the usage of an int as signature number is deprecated, use an option 'signum' in $extraOptions * @param int $timeout deprecated, use an option in $extraOptions * @param string $protocol deprecated, use an option in $extraOptions * @param string $newFuncName deprecated, use an option in $extraOptions @@ -112,8 +112,10 @@ function wrap_xmlrpc_method($client, $methodName, $extraOptions=0, $timeout=0, $ // backwards compat: return string instead of callable $extraOptions['return_source'] = true; $wrapped = $wrapper->wrapXmlrpcMethod($client, $methodName, $extraOptions); - eval($wrapped['source']); - $wrapped = $wrapped['function']; + if (is_array($wrapped)) { + eval($wrapped['source']); + $wrapped = $wrapped['function']; + } } else { $wrapped = $wrapper->wrapXmlrpcMethod($client, $methodName, $extraOptions); } @@ -172,7 +174,7 @@ function build_remote_method_wrapper_code($client, $methodName, $xmlrpcFuncName, for ($i = 1; $i < $pCount; $i++) { $plist[] = "\$p$i"; $pType = $mSig[$i]; - if ($pType == 'i4' || $pType == 'int' || $pType == 'boolean' || $pType == 'double' || + if ($pType == 'i4' || $pType == 'i8' || $pType == 'int' || $pType == 'boolean' || $pType == 'double' || $pType == 'string' || $pType == 'dateTime.iso8601' || $pType == 'base64' || $pType == 'null' ) { // only build directly xmlrpc values when type is known and scalar