Merge pull request #8581 from annando/perfect-scrollbar
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 5 May 2020 12:46:19 +0000 (08:46 -0400)
committerGitHub <noreply@github.com>
Tue, 5 May 2020 12:46:19 +0000 (08:46 -0400)
Integrate perfect-scrollbar to make tests happy

src/Protocol/OStatus.php

index 8ab14c0..cff50f0 100644 (file)
@@ -2081,11 +2081,9 @@ class OStatus
                        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)