summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-20 16:23:23 +0300
committerAndrew Dolgov <[email protected]>2010-11-20 16:23:23 +0300
commitec39a02cd89ee48c0a568c7edbb6b45a1218e3ef (patch)
treee8170cbeeb6127dcade30a5b6095a8fe9eadbf17 /functions.php
parentdb4e4539dc3989fe88f2dbff4f41222071a954ac (diff)
better feed url checking
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php9
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) {