From: Evan Prodromou Date: Sun, 22 Mar 2009 19:34:09 +0000 (-0400) Subject: not correctly checking results of XML-RPC request X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=149fa14bd42e7ba1fe00ae69df189db02f8779df;p=quix0rs-gnu-social.git not correctly checking results of XML-RPC request --- diff --git a/lib/ping.php b/lib/ping.php index d7472b920a..3de541e9aa 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -50,7 +50,15 @@ function ping_broadcast_notice($notice) { "User-Agent: Laconica/".LACONICA_VERSION."\r\n", '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) ".