summaryrefslogtreecommitdiff
path: root/lib/ping.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-22 15:34:09 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-22 15:34:09 -0400
commit149fa14bd42e7ba1fe00ae69df189db02f8779df (patch)
tree1d71b1eff49e67bcd38cd4ea00b2871f6d86d9a9 /lib/ping.php
parent2e3f228b4bdb7bfc59a1fd0ce52fbebde7071566 (diff)
not correctly checking results of XML-RPC request
Diffstat (limited to 'lib/ping.php')
-rw-r--r--lib/ping.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ping.php b/lib/ping.php
index d7472b920..3de541e9a 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) ".