PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » XML_RPC2 » Bug #10231

XML_RPC2::Client doesn't decode body with correct encoding

Details

Submitted2007-03-01 15:43 UTC
Fromwork at carewolf dot com
Assignedsergiosgc
StatusClosed
PackageXML_RPC2
PHP Version5.2.1
Roadmaps(Not assigned)

Comments

[2007-03-01 15:43 UTC] work at carewolf dot com

Description:
------------
When issuing XML-RPC calls the data is transmitted with
the correct encoding, but the result is decoded
incorrectly.

Patch follows

[2007-03-01 15:45 UTC] work at carewolf dot com

diff -Naur Backend.old/Xmlrpcext/Client.php
Backend/Xmlrpcext/Client.php
--- Backend.old/Xmlrpcext/Client.php 2007-03-01
16:34:48.000000000 +0100
+++ Backend/Xmlrpcext/Client.php 2007-03-01
16:35:16.000000000 +0100
@@ -108,7 +108,7 @@
if ($this->debug) {
$this->displayDebugInformations___($request,
$body);
}
- $result = xmlrpc_decode($body);
+ $result = xmlrpc_decode($body, $this->encoding);
if ($result === false) {
if ($this->debug) {
print "XML_RPC2_Exception : unable to
decode response !";

[2007-03-02 02:31 UTC] sergiosgc at php dot net

Thanks for the patch. I've applied it to CVS and will release on the next version.