From ec39a02cd89ee48c0a568c7edbb6b45a1218e3ef Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 20 Nov 2010 16:23:23 +0300 Subject: [PATCH] better feed url checking --- functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 7f287e7c..7d23a409 100644 --- a/functions.php +++ b/functions.php @@ -2892,7 +2892,8 @@ $auth_login = '', $auth_pass = '') { $url = fix_url($url); - if (!validate_feed_url($url)) return 2; + + if (!$url || !validate_feed_url($url)) return 2; if (!fetch_file_contents($url)) return 5; if (url_is_html($url)) { @@ -6450,7 +6451,11 @@ if (strpos($url, '/', strpos($url, ':') + 3) === false) { $url .= '/'; } - return $url; + + if ($url != "http:///") + return $url; + else + return ''; } function validate_feed_url($url) { -- 2.39.5