Skip to content

Commit 5ebbbab

Browse files
committed
[BUGFIX] Allow null extensionName like other parts of the code
1 parent 39f5b9c commit 5ebbbab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/ViewHelpers/Override/V14/TranslateViewHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ private static function getUsedLocale(Locale|string|null $languageKey, ?ServerRe
151151
return null;
152152
}
153153

154-
private static function overrideLocale(Locale|string|null $locale, string $id, string $extensionName): Locale|string|null
154+
private static function overrideLocale(Locale|string|null $locale, string $id, ?string $extensionName): Locale|string|null
155155
{
156156
if (!self::$userConfiguration) {
157157
self::$userConfiguration = GeneralUtility::makeInstance(UserConfiguration::class);
158158
}
159159

160-
if (str_contains($extensionName, '.')) {
160+
if (!empty($extensionName) && str_contains($extensionName, '.')) {
161161
[$extensionName,] = explode('.', $extensionName, 2);
162162
}
163163

0 commit comments

Comments
 (0)