]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
not correctly checking results of XML-RPC request
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 22 Mar 2009 19:34:09 +0000 (15:34 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 22 Mar 2009 19:34:09 +0000 (15:34 -0400)
lib/ping.php

index d7472b920a1075bb57150007260e0e3027d1e680..3de541e9aaf721ec8cbac4e65aabdfbc34d727c9 100644 (file)
@@ -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) ".