Check that $probed key exists before comparison in OStatus\Subscribe

- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349590054
This commit is contained in:
Hypolite Petovan 2022-12-15 23:29:06 -05:00
parent 590f92ba42
commit 0c5158b85d

View file

@ -142,7 +142,7 @@ class Subscribe extends \Friendica\BaseModule
$o .= '<p>' . $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');