Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Bug #13597 XML_RPC2_Backend_Xmlrpcext_Client::remoteCall___ unable to handle FALSE response
Submitted: 2008-04-05 06:52 UTC
From: alexeit Assigned: sergiosgc
Status: Closed Package: XML_RPC2 (version 1.0.2)
PHP Version: 5.2.5 OS: win32
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 14 - 6 = ?

 
 [2008-04-05 06:52 UTC] alexeit (Alexei Tenitski)
Description: ------------ When server responds with (boolean = true) <?xml version="1.0" encoding="UTF-8"?> <methodResponse><params><param><value><boolean>1</boolean></value></param></params></methodResponse> client correctly recognizes TRUE return value When server responds with (boolean = false) <?xml version="1.0" encoding="UTF-8"?> <methodResponse><params><param><value><boolean>0</boolean></value></param></params></methodResponse> xmlrpc_decode returns FALSE but code treats this FALSE as parse failure rather and throws exception. Test script: --------------- This code starting from line 112 in file XML_RPC2_Backend_Xmlrpcext_Client $result = xmlrpc_decode($body, $this->encoding); if ($result === false) { if ($this->debug) { print "XML_RPC2_Exception : unable to decode response !"; } throw new XML_RPC2_Exception('Unable to decode response'); } should be replaced with $result = xmlrpc_decode($body, $this->encoding); if ($result === NULL) { if ($this->debug) { print "XML_RPC2_Exception : unable to decode response !"; } throw new XML_RPC2_Exception('Unable to decode response'); }

Comments

 [2008-09-10 19:16 UTC] sergiosgc (Sérgio Carvalho)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/XML_RPC2