From 2e3f228b4bdb7bfc59a1fd0ce52fbebde7071566 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 22 Mar 2009 15:23:40 -0400 Subject: variable name error --- lib/ping.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ping.php') diff --git a/lib/ping.php b/lib/ping.php index 2cbec2f21..d7472b920 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -48,7 +48,7 @@ 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); $response = xmlrpc_decode($file); if (xmlrpc_is_fault($response)) { -- cgit v1.2.3-54-g00ecf From 149fa14bd42e7ba1fe00ae69df189db02f8779df Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 22 Mar 2009 15:34:09 -0400 Subject: not correctly checking results of XML-RPC request --- lib/ping.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/ping.php') 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) ". -- cgit v1.2.3-54-g00ecf