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 #8343

XML_RPC2 not returning the boolean FALSE

Details

Submitted2006-08-01 23:14 UTC
Fromjames at serafinistudios dot com
Assignedsergiosgc
StatusClosed
PackageXML_RPC2
PHP Version5.1.4
OSSUSE 10.1
Roadmaps(Not assigned)

Comments

[2006-08-01 23:14 UTC] james at serafinistudios dot com

Description:
------------
On the server side, when a method fails, it returns an array with two elements array(FALSE, $error_msg);
When the client side receives it, the array is (1, "Something didn't happen right").
I am using XML_RPC2_Server and XML_RPC2_Client, version 0.0.7 alpha. It happens with FALSE and false, both return as 1 on the client side. Not using an array, and just returning a straight FALSE, still returns 1 to the client.

'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--enable-mbstring' '--with-openssl' '--enable-bcmath' '--enable-xml' '--with-iconv' '--disable-magic-quotes' '--enable-ftp' '--with-curl'

Test script:
---------------
//Server side
function doSomething($thing) {
if ( ! $thing ) {
return array(FALSE, "Something didn't happen");
}
return array(TRUE, "Something happened.");
}

//Client side
$result = $client->doSomething(0);

print_r($result);
// Array([0] => 1, [1] => "Something didn't happen")

Expected result:
----------------
$result should have been Array([0] => 0, [1] => "Something didn't happen")

Actual result:
--------------
// Array([0] => 1, [1] => "Something didn't happen")

[2006-12-02 17:55 UTC] sergiosgc at php dot net

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