Merge pull request #8579 from MrPetovan/bug/fatal-errors

Ensure Tag::getByURIId parameter value in OStatus::entryFooter
This commit is contained in:
Michael Vogel 2020-05-05 06:25:31 +02:00 committed by GitHub
commit 64069f8bd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2081,12 +2081,10 @@ class OStatus
XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes);
}
$tags = Tag::getByURIId($item['uri-id']);
if (count($tags)) {
foreach ($tags as $tag) {
// uri-id isn't present for follow entry pseudo-items
foreach (Tag::getByURIId($item['uri-id'] ?? 0) as $tag) {
$mentioned[$tag['url']] = $tag['url'];
}
}
// Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
$newmentions = [];