Skip to content

Commit

Permalink
Merge pull request #8579 from MrPetovan/bug/fatal-errors
Browse files Browse the repository at this point in the history
Ensure Tag::getByURIId parameter value in OStatus::entryFooter
  • Loading branch information
annando committed May 5, 2020
2 parents 05cac4c + 340bc57 commit 64069f8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Protocol/OStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -2081,11 +2081,9 @@ private static function entryFooter(DOMDocument $doc, $entry, array $item, array
XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes);
}

$tags = Tag::getByURIId($item['uri-id']);
if (count($tags)) {
foreach ($tags as $tag) {
$mentioned[$tag['url']] = $tag['url'];
}
// 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)
Expand Down

0 comments on commit 64069f8

Please sign in to comment.