Merge pull request #10133 from annando/notice

Avoid notice "Undefined index: post-type"
This commit is contained in:
Hypolite Petovan 2021-04-08 18:59:29 -04:00 committed by GitHub
commit 425a225cce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -878,7 +878,7 @@ function conversation_fetch_items(array $parent, array $items, array $condition,
$condition[0] .= " AND NOT `author-hidden`";
}
$thread_items = Post::selectForUser(local_user(), array_merge(Item::DISPLAY_FIELDLIST, ['pinned', 'contact-uid', 'gravity', 'post-reason']), $condition, $params);
$thread_items = Post::selectForUser(local_user(), array_merge(Item::DISPLAY_FIELDLIST, ['pinned', 'contact-uid', 'gravity', 'post-type', 'post-reason']), $condition, $params);
$comments = conversation_fetch_comments($thread_items, $parent['pinned'] ?? false, $activity);