From: Stig Bakken Date: Wed, 13 Feb 2002 01:09:55 +0000 (+0000) Subject: * don't use ext/overload yet X-Git-Tag: php-4.2.0RC1~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=773ee5d7e72fa7978a81bef8c3c433c74d21d4b8;p=php * don't use ext/overload yet --- diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index f2a44f9648..eb5aa63ee8 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -46,35 +46,20 @@ class PEAR_Remote extends PEAR // {{{ call(method, [args...]) function call($method) - { - $args = func_get_args(); - array_shift($args); - $this->__call($method, $args, $retval); - return $retval; - } - - // }}} - - // {{{ __call(method, args) - - function __call($method, $params, &$retval) { if (!extension_loaded("xmlrpc")) { - $retval = $this->raiseError("xmlrpc support not loaded"); - return false; + return $this->raiseError("xmlrpc support not loaded"); } $method = str_replace("_", ".", $method); $request = xmlrpc_encode_request($method, $params); $server_host = $this->config_object->get("master_server"); if (empty($server_host)) { - $retval = $this->raiseError("PEAR_Remote::call: no master_server configured"); - return false; + return $this->raiseError("PEAR_Remote::call: no master_server configured"); } $server_port = 80; $fp = @fsockopen($server_host, $server_port); if (!$fp) { - $retval = $this->raiseError("PEAR_Remote::call: fsockopen(`$server_host', $server_port) failed"); - return false; + 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". @@ -100,25 +85,19 @@ class PEAR_Remote extends PEAR if ($ret['message'] === '') $ret['message'] = null; if ($ret['userinfo'] === '') $ret['userinfo'] = null; if (strtolower($class) == 'db_error') { - $retval = $this->raiseError(DB::errorMessage($ret['code']), + $ret = $this->raiseError(DB::errorMessage($ret['code']), $ret['code'], null, null, $ret['userinfo']); } else { - $retval = $this->raiseError($ret['message'], $ret['code'], + $ret = $this->raiseError($ret['message'], $ret['code'], null, null, $ret['userinfo']); } - return true; } } - $retval = $ret; - return true; + return $ret; } // }}} } -if (function_exists("overload")) { - overload("PEAR_Remote"); -} - ?> \ No newline at end of file