Home » Web Services » XML_RPC » Bug #6155
fault code handling
Details
| Submitted | 2005-12-05 13:39 UTC |
|---|---|
| From | llian at gmx dot net |
| Status | Bogus |
| Package | XML_RPC |
| PHP Version | 4.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;
}
}