[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-doc
Subject: [PEAR-DOC] [PEAR-BUG] Bug #7748 [NEW]: XML-RPC 1.4.8 locale error
From: "tugrulyilmazer at gmail dot com" <pear-doc () lists ! php ! net>
Date: 2006-05-29 9:57:47
Message-ID: bug-7748 () pear ! php ! net
[Download RAW message or body]
From: tugrulyilmazer at gmail dot com
Operating system: GNU Debian/Linux
Package version:
PHP version: 4.3.10
Package: Documentation
Bug Type: Bug
Bug description: XML-RPC 1.4.8 locale error
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 bug report at http://pear.php.net/bugs/bug.php?id=7748&edit=1
--
--
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic