diff options
Diffstat (limited to 'lib/ping.php')
-rw-r--r-- | lib/ping.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ping.php b/lib/ping.php index 2cbec2f21..3de541e9a 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -48,9 +48,17 @@ function ping_broadcast_notice($notice) { 'header' => "Content-Type: text/xml\r\n". "User-Agent: Laconica/".LACONICA_VERSION."\r\n", - 'content' => $request))); + 'content' => $req))); $file = file_get_contents($notify_url, false, $context); + + if ($file === false || mb_strlen($file) == 0) { + common_log(LOG_WARNING, + "XML-RPC empty results for ping ($notify_url, $notice->id) "); + continue; + } + $response = xmlrpc_decode($file); + if (xmlrpc_is_fault($response)) { common_log(LOG_WARNING, "XML-RPC error for ping ($notify_url, $notice->id) ". |