diff --git a/Classes/ViewHelpers/CountriesViewHelper.php b/Classes/ViewHelpers/CountriesViewHelper.php index 77faf3a..70a4e58 100644 --- a/Classes/ViewHelpers/CountriesViewHelper.php +++ b/Classes/ViewHelpers/CountriesViewHelper.php @@ -60,9 +60,7 @@ public function render(): array break; case 3: /** @var TerritoryRepository $territoryRepository */ - $territoryRepository = ObjectUtility::getObjectManager()->get( - TerritoryRepository::class - ); + $territoryRepository = GeneralUtility::makeInstance(TerritoryRepository::class); $territories = $territoryRepository ->findAllByUidInList($field->getTerritories())->toArray(); $countries = $this->findByTerritories($territories);