Commit 5f65d541 authored by Franco Fichtner's avatar Franco Fichtner

xmlrpc: log target down; closes #429

parent f5cedec5
...@@ -140,11 +140,16 @@ class SimpleXMLRPC_Client ...@@ -140,11 +140,16 @@ class SimpleXMLRPC_Client
) )
)); ));
$this->response_received = file_get_contents($this->url, false, $context); $this->response_received = @file_get_contents($this->url, false, $context);
if ($this->response_received === false) {
$this->error = 'fetch error. remote host down?';
return false;
}
if ($this->debug) { if ($this->debug) {
echo ">>> received : \n".$this->response_received."\n"; echo ">>> received : \n".$this->response_received."\n";
} }
$this->message = new IXR_Message($this->response_received); $this->message = new IXR_Message($this->response_received);
if (!$this->message->parse()) { if (!$this->message->parse()) {
$this->error = 'parse error. not well formed'; $this->error = 'parse error. not well formed';
...@@ -153,6 +158,7 @@ class SimpleXMLRPC_Client ...@@ -153,6 +158,7 @@ class SimpleXMLRPC_Client
$this->error = $this->message->faultString; $this->error = $this->message->faultString;
return false; return false;
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment