cvs: php4 /pear/PEAR Remote.php
| From: | Stig Bakken | Date: | Fri, 14 Jun 2002 22:25:37 +0000 |
| Subject: | cvs: php4 /pear/PEAR Remote.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4626@lists.php.net to get a copy of this message | ||
ssb Fri Jun 14 18:25:37 2002 EDT
Modified files:
/php4/pear/PEAR Remote.php
Log:
* if verbosity config is > 3, display xmlrpc response
* another bugfix
Index: php4/pear/PEAR/Remote.php
diff -u php4/pear/PEAR/Remote.php:1.25 php4/pear/PEAR/Remote.php:1.26
--- php4/pear/PEAR/Remote.php:1.25 Fri Jun 14 10:55:28 2002
+++ php4/pear/PEAR/Remote.php Fri Jun 14 18:25:37 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Remote.php,v 1.25 2002/06/14 14:55:28 alan_k Exp $
+// $Id: Remote.php,v 1.26 2002/06/14 22:25:37 ssb Exp $
require_once 'PEAR.php';
require_once 'PEAR/Config.php';
@@ -162,6 +162,10 @@
$response .= $chunk;
}
fclose($fp);
+ if ($this->config->get('verbose') > 3) {
+ print "XMLRPC RESPONSE:\n";
+ var_dump($response);
+ }
$ret = xmlrpc_decode($response);
if (is_array($ret) && isset($ret['__PEAR_TYPE__'])) {
if ($ret['__PEAR_TYPE__'] == 'error') {
@@ -182,9 +186,9 @@
null, null, $ret['userinfo']);
}
}
- } elseif (is_array($ret) && sizeof($ret) == 1 &&
- isset($ret[0]['faultString']) &&
- isset($ret[0]['faultCode'])) {
+ } elseif (is_array($ret) && sizeof($ret) == 1 && is_array($ret[0])
&&
+ !empty($ret[0]['faultString']) &&
+ !empty($ret[0]['faultCode'])) {
extract($ret[0]);
$faultString = "XML-RPC Server Fault: " .
str_replace("\n", " ", $faultString);