Merge pull request #13071 from annando/warning

Fix warning: Undefined array key "post"
This commit is contained in:
Hypolite Petovan 2023-05-02 08:04:31 -04:00 committed by GitHub
commit 791488982a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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']);
}