diff options
author | Andrew Dolgov <[email protected]> | 2010-11-20 16:23:23 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-20 16:23:23 +0300 |
commit | ec39a02cd89ee48c0a568c7edbb6b45a1218e3ef (patch) | |
tree | e8170cbeeb6127dcade30a5b6095a8fe9eadbf17 | |
parent | db4e4539dc3989fe88f2dbff4f41222071a954ac (diff) |
better feed url checking
-rw-r--r-- | functions.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 7f287e7cb..7d23a4093 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) { |