Bug #7748 [Opn]: XML-RPC 1.4.8 locale error

From: Date: Mon, 29 May 2006 10:02:19 +0000
Subject: Bug #7748 [Opn]: XML-RPC 1.4.8 locale error
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7952@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=7748&edit=1 ID: 7748 User updated by: tugrulyilmazer at gmail dot com Reported By: tugrulyilmazer at gmail dot com Status: Open Id: 7748 Type: Bug Package: Documentation Operating System: GNU Debian/Linux PHP Version: 4.3.10 New Comment: Sorry; Actual result: -------------- Warning: in_array(): Wrong datatype for second argument in /usr/share/php/XML/RPC.php on line 269 Fault Code: 2 Fault Reason: Invalid return payload: enable debugging to examine incoming payload xmlrpc element STRÝNG cannot be child of VALUE Expected result: ---------------- Mustafa Tugrul Previous Comments: ------------------------------------------------------------------------ [2006-05-29 05:57:47] tugrulyilmazer at gmail dot com Description: ------------ I couldn't find problem cause. If i write a setlocale(LC_ALL, 'tr_TR'); line at client.php, i have a got a big problem. Test script: --------------- client.php: <?php require_once 'XML/RPC.php'; setlocale(LC_ALL, 'tr_TR'); $input = 'Mustafa Tugrul'; $params = array(new XML_RPC_Value($input, 'string')); $msg = new XML_RPC_Message('times2', $params); $cli = new XML_RPC_Client('/~corporem/phpcalismalar/rpc/server.php', 'localhost'); $resp = $cli->send($msg); if (!$resp) { echo 'Communication error: ' . $cli->errstr; exit; } if (!$resp->faultCode()) { $val = $resp->value(); echo $val->scalarval(); } else { echo 'Fault Code: ' . $resp->faultCode() . "\n"; echo 'Fault Reason: ' . $resp->faultString() . "\n"; } ?> server.php: <?php require_once 'XML/RPC/Server.php'; class hebele { function a($params) { $param = $params->getParam(0); $a = $param->scalarval(); if (!XML_RPC_Value::isValue($param)) { return $param; } $val = new XML_RPC_Value($a, 'string'); return new XML_RPC_Response($val); } } $server = new XML_RPC_Server( array('times2' => array('function' => 'hebele::a')) ); ?> Expected result: ---------------- Warning: in_array(): Wrong datatype for second argument in /usr/share/php/XML/RPC.php on line 269 Fault Code: 2 Fault Reason: Invalid return payload: enable debugging to examine incoming payload xmlrpc element STRÝNG cannot be child of VALUE Actual result: -------------- Mustafa Tugrul ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=7748&edit=1

« previous php.pear.doc (#7952) next »