diff --git a/src/Latte/Essential/TranslatorExtension.php b/src/Latte/Essential/TranslatorExtension.php index f5d202f70..738991881 100644 --- a/src/Latte/Essential/TranslatorExtension.php +++ b/src/Latte/Essential/TranslatorExtension.php @@ -50,7 +50,7 @@ public function getTags(): array public function getFilters(): array { return [ - 'translate' => fn(Latte\Runtime\FilterInfo $fi, ...$args): string => $this->translator + 'translate' => fn(Latte\Runtime\FilterInfo $fi, ...$args) => $this->translator ? ($this->translator)(...$args) : $args[0], ];