From 20f99d59f1475dc9a6fde3c51977c854e09cf0cb Mon Sep 17 00:00:00 2001 From: Stefan Neufeind Date: Mon, 18 Mar 2024 09:58:59 +0100 Subject: [PATCH] DBAL: Ensure compatibility for TYPO3 10 LTS --- Classes/Menu/AbstractMenu.php | 4 ++-- Classes/Service/CountryService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Menu/AbstractMenu.php b/Classes/Menu/AbstractMenu.php index 967dc44..687d72c 100644 --- a/Classes/Menu/AbstractMenu.php +++ b/Classes/Menu/AbstractMenu.php @@ -82,7 +82,7 @@ protected function isAvailableLanguage(SiteLanguage $language): bool ->from(self::TABLE_NAME) ->where($this->queryBuilder->expr()->andX(...$constraints)) ->execute() - ->fetchOne(); + ->fetchColumn(); } protected function isAvailableCountry(Country $country = null): bool @@ -97,7 +97,7 @@ protected function isAvailableCountry(Country $country = null): bool ->from(self::TABLE_NAME) ->where($this->queryBuilder->expr()->andX(...$constraints)) ->execute() - ->fetchOne(); + ->fetchColumn(); } protected function createLink(SiteLanguage $language, Country $country = null): ?string diff --git a/Classes/Service/CountryService.php b/Classes/Service/CountryService.php index c74c291..5ff3728 100644 --- a/Classes/Service/CountryService.php +++ b/Classes/Service/CountryService.php @@ -47,7 +47,7 @@ public static function getAllCountries(): array return array_map(static function ($row) { return Country::makeInstance($row); - }, $queryBuilder->select('*')->from('tx_z7countries_country')->execute()->fetchAllAssociative()); + }, $queryBuilder->select('*')->from('tx_z7countries_country')->execute()->fetchAll(FetchMode::ASSOCIATIVE)); }; return self::cacheObject($function, 'allCountries');