From: Stig Bakken Date: Tue, 30 Oct 2001 12:28:39 +0000 (+0000) Subject: * improved error reporting in PEAR_Remote::call X-Git-Tag: ChangeLog~472 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a8854b5b1fae635c9bdefa7dac70ba6e8db65bd;p=php * improved error reporting in PEAR_Remote::call --- 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".