]> git.mxchange.org Git - friendica.git/commitdiff
Check that $probed key exists before comparison in OStatus\Subscribe
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 16 Dec 2022 04:29:06 +0000 (23:29 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 16 Dec 2022 04:29:06 +0000 (23:29 -0500)
- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349590054

src/Module/OStatus/Subscribe.php

index 52bd19aef205cafae9e259df3cc738b9a66ca381..da05cfa632279fe5fffdffd38326e88aa02c7d3f 100644 (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');