Skip to content

Commit bb3dd76

Browse files
committed
Internal: Use nullsafe operator for translator retrieval in get_lang() function - refs BT#22627
1 parent 84c9727 commit bb3dd76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/main/inc/lib/internationalization.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
*/
5858
function get_lang(string $variable, ?string $locale = null): string
5959
{
60-
$translator = Container::$translator ?: Container::$container->get('translator');
60+
$translator = Container::$translator ?: Container::$container?->get('translator');
6161

6262
if (!$translator) {
6363
return $variable;

0 commit comments

Comments
 (0)