aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-11-24 16:05:19 +0100
committerMario Vavti <mario@mariovavti.com>2022-11-24 16:05:19 +0100
commit7ec6df495f5e740b16d7bdca89b18a3f6bc78c80 (patch)
tree74a44ce0ba21ff0f01c8530851c717a9dd80703b
parentaeda31fda7ac6e788eb31b455970b349a1cc0fa7 (diff)
downloadvolse-hubzilla-7ec6df495f5e740b16d7bdca89b18a3f6bc78c80.tar.gz
volse-hubzilla-7ec6df495f5e740b16d7bdca89b18a3f6bc78c80.tar.bz2
volse-hubzilla-7ec6df495f5e740b16d7bdca89b18a3f6bc78c80.zip
slight restructure
-rw-r--r--Zotlabs/Lib/Webfinger.php18
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