From 75534fa3f36690638fa636200892c24055616180 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 17 May 2022 12:38:39 +0000 Subject: [PATCH] Fix warning " Trying to access array offset on value of type bool" --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 822580aa20..50ef7c8c06 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2793,7 +2793,7 @@ class Item $shared_item = Post::selectFirst(['uri-id', 'plink', 'has-media'], ['guid' => $shared['guid']]); $shared_uri_id = $shared_item['uri-id'] ?? 0; $shared_links = [strtolower($shared_item['plink'] ?? '')]; - $shared_attachments = Post\Media::splitAttachments($shared_uri_id, $shared['guid'], [], $shared_item['has-media']); + $shared_attachments = Post\Media::splitAttachments($shared_uri_id, $shared['guid'], [], $shared_item['has-media'] ?? false); $shared_links = array_merge($shared_links, array_column($shared_attachments['visual'], 'url')); $shared_links = array_merge($shared_links, array_column($shared_attachments['link'], 'url')); $shared_links = array_merge($shared_links, array_column($shared_attachments['additional'], 'url')); -- 2.39.5