Merge pull request #13954 from annando/issue-13953

Issue 13953: Fix warning during postupdate
This commit is contained in:
Hypolite Petovan 2024-03-01 08:38:42 -05:00 committed by GitHub
commit 39d25b9699
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -695,7 +695,7 @@ class Item
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
} }
$shared_content = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid'], $item['uri']); $shared_content = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'] ?? $item['uri'], $item['created'], $item['guid'], $item['uri']);
if (!empty($item['title'])) { if (!empty($item['title'])) {
$shared_content .= '[h3]' . $item['title'] . "[/h3]\n"; $shared_content .= '[h3]' . $item['title'] . "[/h3]\n";

View File

@ -48,6 +48,9 @@ class SearchIndex
} }
$item = Post::selectFirstPost(['created', 'owner-id', 'private', 'language', 'network', 'title', 'content-warning', 'body', 'quote-uri-id'], ['uri-id' => $uri_id]); $item = Post::selectFirstPost(['created', 'owner-id', 'private', 'language', 'network', 'title', 'content-warning', 'body', 'quote-uri-id'], ['uri-id' => $uri_id]);
if (empty($item)) {
return;
}
$search = [ $search = [
'uri-id' => $uri_id, 'uri-id' => $uri_id,