diff --git a/src/Utils/LocaleHelper.php b/src/Utils/LocaleHelper.php index baafb6a34..a598379e2 100644 --- a/src/Utils/LocaleHelper.php +++ b/src/Utils/LocaleHelper.php @@ -107,7 +107,7 @@ public function getLocales(Environment $twig, ?Collection $localeCodes = null, b private function isCurrentLocale(string $localeCode, string $currentLocale, Collection $localeCodes): bool { - if (! $localeCodes->has($currentLocale)) { + if (! $localeCodes->contains($currentLocale)) { return $localeCode === $this->defaultLocale; }