From 4ce19118892f75f3e31d1b226c7a886c1051c0cc Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 16 May 2024 10:25:35 +0000 Subject: [PATCH] Fixes " Undefined array key url" --- src/Network/Probe.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 77a25dac4b..5ee1a80982 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -1201,7 +1201,7 @@ class Probe if (!empty($webfinger['aliases']) && is_array($webfinger['aliases'])) { foreach ($webfinger['aliases'] as $alias) { - if (empty($data['url']) && !strstr($alias, '@')) { + if (empty($data['url']) && Network::isValidHttpUrl($alias)) { $data['url'] = $alias; } elseif (Network::isValidHttpUrl($alias) && !Strings::compareLink($alias, $data['url'])) { $data['alias'] = $alias; @@ -1455,7 +1455,7 @@ class Probe if (!empty($webfinger['aliases']) && is_array($webfinger['aliases'])) { foreach ($webfinger['aliases'] as $alias) { - if (strstr($alias, '@') && !strstr(Strings::normaliseLink($alias), 'http://')) { + if (strstr($alias, '@') && !Network::isValidHttpUrl($alias)) { $data['addr'] = str_replace('acct:', '', $alias); } } @@ -1463,7 +1463,7 @@ class Probe if ( !empty($webfinger['subject']) && strstr($webfinger['subject'], '@') - && !strstr(Strings::normaliseLink($webfinger['subject']), 'http://') + && !Network::isValidHttpUrl($webfinger['subject']) ) { $data['addr'] = str_replace('acct:', '', $webfinger['subject']); }