Skip to content

Commit

Permalink
TranslatorExtension: translate() can return \Stringable [Closes #372]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 8, 2024
1 parent be23491 commit 1273640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Latte/Essential/TranslatorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
];
Expand Down

0 comments on commit 1273640

Please sign in to comment.