From 5e3f6d89a5c365dadfa64ffecf1b3bdfe9b11b44 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 25 Mar 2004 23:05:25 +0000 Subject: [PATCH] Don't try to ping empty sets. git-svn-id: http://svn.automattic.com/wordpress/trunk@1017 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f932b5552e..d81466f841 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -571,7 +571,6 @@ function weblog_ping($server = '', $path = '') { new xmlrpcval(get_settings('blog_url') ,'string'))); $c = new xmlrpc_client($path, $server, 80); $r = $c->send($f); - if (!$r) { die("send failed"); } if ($debug) { print "

Response Object Dump:

\n"; @@ -600,10 +599,12 @@ function weblog_ping($server = '', $path = '') { function generic_ping($post_id = 0) { $services = get_settings('ping_sites'); $services = preg_replace("|(\s)+|", '$1', $services); // Kill dupe lines - $services = explode("\n", trim($services)); - foreach ($services as $service) { - $uri = parse_url($service); - weblog_ping($uri['host'], $uri['path']); + if ('' != trim($services)) { + $services = explode("\n", trim($services)); + foreach ($services as $service) { + $uri = parse_url($service); + weblog_ping($uri['host'], $uri['path']); + } } }