diff options
-rw-r--r-- | Zotlabs/Lib/Webfinger.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Webfinger.php b/Zotlabs/Lib/Webfinger.php index 16d54010c..a0a4aef47 100644 --- a/Zotlabs/Lib/Webfinger.php +++ b/Zotlabs/Lib/Webfinger.php @@ -52,15 +52,21 @@ class Webfinger { if(strpos($resource,'http') === 0) { $m = parse_url($resource); - if($m) { - if(isset($m['scheme']) && $m['scheme'] !== 'https') { - return false; - } - self::$server = $m['host'] . ((isset($m['port'])) ? ':' . $m['port'] : ''); + + if (!$m) { + return false; } - else { + + if(isset($m['scheme']) && $m['scheme'] !== 'https') { return false; } + + if(!isset($m['host'])) { + return false; + } + + self::$server = $m['host'] . ((isset($m['port'])) ? ':' . $m['port'] : ''); + } elseif(strpos($resource,'tag:') === 0) { $arr = explode(':',$resource); // split the tag |