PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » XML_RPC » Bug #6155

fault code handling

Details

Submitted2005-12-05 13:39 UTC
Fromllian at gmx dot net
StatusBogus
PackageXML_RPC
PHP Version4.4.1
OS*nix
Roadmaps(Not assigned)

Comments

[2005-12-05 13:39 UTC] llian at gmx dot net

Description:
------------
if the returning xml fault code equals 0 there is no way to distinguish between a 'fault' and a 'nofault'.

Test script:
---------------
function XML_RPC_Response($val, $fcode = 0, $fstr = '')
{
if ($fcode != 0) {
$this->fn = $fcode;
$this->fs = htmlspecialchars($fstr);
} else {
$this->xv = $val;
}
}

if the returning xml fault code equals 0 there is no way to distinguish between a 'fault' and a 'nofault'.

[2005-12-05 13:41 UTC] llian at gmx dot net

sorry wrong past

the function bellow is the right one:

function faultCode()
{
if (isset($this->fn)) {
return $this->fn;
} else {
return 0;
}
}