From 99cfda37569a40ebad0b65ff8cd706b93c87a5de Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Fri, 29 Mar 2002 02:17:55 +0000 Subject: [PATCH] * pass on xmlrpc faults as pear errors --- pear/PEAR/Remote.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- 2.50.1