]> git.mxchange.org Git - friendica.git/commitdiff
Fix warning: Undefined array key "post"
authorMichael <heluecht@pirati.ca>
Tue, 2 May 2023 09:21:11 +0000 (09:21 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 May 2023 09:21:11 +0000 (09:21 +0000)
src/Model/Item.php

index a730404ed4f40a05e7b1d9fe4dcb9b0fd8592e9b..1943ea4f8f0e18f7a789c4e161701095bfd0f01f 100644 (file)
@@ -3047,7 +3047,7 @@ class Item
                                $shared_item = Post::selectFirst($fields, ['uri-id' => $media[0]['media-uri-id'], 'uid' => [$item['uid'], 0]]);
                                if (empty($shared_item['uri-id'])) {
                                        $shared_item = Post::selectFirst($fields, ['plink' => $media[0]['url'], 'uid' => [$item['uid'], 0]]);
-                               } elseif (strtolower($shared['post']['uri']) != strtolower($media[0]['url'])) {
+                               } elseif (!in_array(strtolower($media[0]['url']), $shared_links)) {
                                        $shared_links[] = strtolower($media[0]['url']);
                                }