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
1 changed files with 1 additions and 1 deletions

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');