cvs: php4 /pear/PEAR Remote.php
| From: | Stig Bakken | Date: | Tue, 30 Oct 2001 12:28:39 +0000 |
| Subject: | cvs: php4 /pear/PEAR Remote.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1201@lists.php.net to get a copy of this message | ||
ssb Tue Oct 30 07:28:39 2001 EDT
Modified files:
/php4/pear/PEAR Remote.php
Log:
* improved error reporting in PEAR_Remote::call
Index: php4/pear/PEAR/Remote.php
diff -u php4/pear/PEAR/Remote.php:1.2 php4/pear/PEAR/Remote.php:1.3
--- php4/pear/PEAR/Remote.php:1.2 Fri Oct 26 07:45:21 2001
+++ php4/pear/PEAR/Remote.php Tue Oct 30 07:28:39 2001
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Remote.php,v 1.2 2001/10/26 11:45:21 ssb Exp $
+// $Id: Remote.php,v 1.3 2001/10/30 12:28:39 ssb Exp $
require_once 'PEAR.php';
@@ -53,11 +53,13 @@
$params = array_slice(func_get_args(), 1);
$request = xmlrpc_encode_request($method, $params);
$server_host = $this->config_object->get("master_server");
+ if (empty($server_host)) {
+ return $this->raiseError("PEAR_Remote::call: no master_server
configured");
+ }
$server_port = 80;
- flush();
$fp = @fsockopen($server_host, $server_port);
if (!$fp) {
- return $this->raiseError("PEAR_Remote::call: connect failed");
+ return $this->raiseError("PEAR_Remote::call: fsockopen(`$server_host',
$server_port) failed");
}
$len = strlen($request);
fwrite($fp, ("POST /xmlrpc.php HTTP/1.0\r\n".