diff --git a/components/Feed/Controller/Feeds.php b/components/Feed/Controller/Feeds.php index 5dd84e545d..77a64dfd79 100644 --- a/components/Feed/Controller/Feeds.php +++ b/components/Feed/Controller/Feeds.php @@ -70,7 +70,7 @@ class Feeds extends FeedController $data = Feed::query( query: 'note-from:subscribed-person,subscribed-group,subscribed-organization,subscribed-business', page: $this->int('p'), - language: $actor?->getTopLanguage()?->getLocale(), + language: $actor->getTopLanguage()->getLocale(), actor: $actor, ); return [ diff --git a/src/Util/Formatting.php b/src/Util/Formatting.php index 72db7b979c..b66757c9e7 100644 --- a/src/Util/Formatting.php +++ b/src/Util/Formatting.php @@ -392,7 +392,7 @@ abstract class Formatting 'text' => $match[0], 'position' => $match[1], 'length' => mb_strlen($match[0]), - 'title' => $mentioned?->getFullname() ?? $mentioned?->getNickname(), + 'title' => $mentioned->getFullname() ?? $mentioned->getNickname(), 'url' => $url, ]; } diff --git a/tests/Controller/FeedsTest.php b/tests/Controller/FeedsTest.php index 99af81547b..7a395227ab 100644 --- a/tests/Controller/FeedsTest.php +++ b/tests/Controller/FeedsTest.php @@ -23,13 +23,13 @@ declare(strict_types = 1); namespace App\Tests\Controller; -use App\Controller\Feeds; use App\Core\DB\DB; use App\Core\Security; use App\Entity\Note; use App\Util\Common; use App\Util\Exception\ClientException; use App\Util\GNUsocialTestCase; +use Component\Feed\Controller\Feeds; use Jchook\AssertThrows\AssertThrows; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack;