cvs: php4 /pear/PEAR Remote.php
| From: | Stig Bakken | Date: | Fri, 29 Mar 2002 02:17:55 +0000 |
| Subject: | cvs: php4 /pear/PEAR Remote.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-2894@lists.php.net to get a copy of this message | ||
ssb Thu Mar 28 21:17:55 2002 EDT
Modified files:
/php4/pear/PEAR Remote.php
Log:
* pass on xmlrpc faults as pear errors
Index: php4/pear/PEAR/Remote.php
diff -u php4/pear/PEAR/Remote.php:1.14 php4/pear/PEAR/Remote.php:1.15
--- php4/pear/PEAR/Remote.php:1.14 Fri Mar 22 04:22:26 2002
+++ php4/pear/PEAR/Remote.php Thu Mar 28 21:17:55 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Remote.php,v 1.14 2002/03/22 09:22:26 ssb Exp $
+// $Id: Remote.php,v 1.15 2002/03/29 02:17:55 ssb Exp $
require_once 'PEAR.php';
require_once 'PEAR/Config.php';
@@ -114,6 +114,13 @@
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;
}