From: Roland Häder Date: Tue, 19 Jul 2022 21:44:54 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2ef0566ba55ffc9b261e39d9fd0c398ba0a539a2;p=friendica.git Fixed: - "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 --- diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 6d3c23dad6..81ba7b4a3d 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -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; }