From 9a8854b5b1fae635c9bdefa7dac70ba6e8db65bd Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Tue, 30 Oct 2001 12:28:39 +0000 Subject: [PATCH] * improved error reporting in PEAR_Remote::call --- pear/PEAR/Remote.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index 5c66b8e941..17c36e023c 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -53,11 +53,13 @@ class PEAR_Remote extends PEAR $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". -- 2.50.1