]> git.mxchange.org Git - friendica.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Tue, 19 Jul 2022 21:44:54 +0000 (23:44 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 19 Jul 2022 21:46:09 +0000 (23:46 +0200)
- "Undefined variable: contact in .../src/Protocol/Diaspora.php on line 4097
Trying to access array offset on value of type null in .../src/Protocol/Diaspora.php on line 4097"
- see https://github.com/friendica/friendica/issues/11632#issuecomment-1189465336

src/Protocol/Diaspora.php

index 6d3c23dad6f73ec8c0fbaf3a12678afadd595aee..81ba7b4a3df1ecf1050f4bf2225fe96a9aa3a3f6 100644 (file)
@@ -4081,6 +4081,7 @@ class Diaspora
         */
        public static function createCommentSignature(array $item)
        {
+               $contact = [];
                if (!empty($item['author-link'])) {
                        $url = $item['author-link'];
                } else {
@@ -4094,7 +4095,7 @@ class Diaspora
 
                $uid = User::getIdForURL($url);
                if (empty($uid)) {
-                       Logger::info('No owner post, so not storing signature', ['url' => $contact['url']]);
+                       Logger::info('No owner post, so not storing signature', ['url' => $contact['url'] ?? 'No contact loaded']);
                        return false;
                }