From: Hypolite Petovan Date: Fri, 16 Dec 2022 04:29:06 +0000 (-0500) Subject: Check that $probed key exists before comparison in OStatus\Subscribe X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0c5158b85d762ce5c7fa596fdc51d50ef5064f5b;p=friendica.git Check that $probed key exists before comparison in OStatus\Subscribe - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349590054 --- 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');