From 0c5158b85d762ce5c7fa596fdc51d50ef5064f5b Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Dec 2022 23:29:06 -0500 Subject: [PATCH] Check that $probed key exists before comparison in OStatus\Subscribe - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349590054 --- src/Module/OStatus/Subscribe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/OStatus/Subscribe.php b/src/Module/OStatus/Subscribe.php index 52bd19aef2..da05cfa632 100644 --- a/src/Module/OStatus/Subscribe.php +++ b/src/Module/OStatus/Subscribe.php @@ -142,7 +142,7 @@ class Subscribe extends \Friendica\BaseModule $o .= '

' . $counter . '/' . $total . ': ' . $url; $probed = Contact::getByURL($url); - if (in_array($probed['network'], Protocol::FEDERATED)) { + if (!empty($probed['network']) && in_array($probed['network'], Protocol::FEDERATED)) { $result = Contact::createFromProbeForUser($this->session->getLocalUserId(), $probed['url']); if ($result['success']) { $o .= ' - ' . $this->t('success'); -- 2.39.5