diff options
-rw-r--r-- | pear/PEAR/Remote.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index 97317cc71c..1f20db6508 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -114,6 +114,13 @@ class PEAR_Remote extends PEAR null, null, $ret['userinfo']); } } + } elseif (is_array($ret) && sizeof($ret) == 1 && + isset($ret[0]['faultString']) && + isset($ret[0]['faultCode'])) { + extract($ret[0]); + $faultString = "XML-RPC Server Fault: " . + str_replace("\n", " ", $faultString); + return $this->raiseError($faultString, $faultCode); } return $ret; } |