Skip to content

Commit

Permalink
Merge pull request #171 from kickz/patch-3
Browse files Browse the repository at this point in the history
Fix returned value in translate function
  • Loading branch information
enumag committed Aug 22, 2019
2 parents 7addf5d + aba05c1 commit 21d848a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Translator.php
Expand Up @@ -137,8 +137,7 @@ public function translate($message, ...$arg): string
$locale = isset($arg[3]) ? $arg[3] : NULL;

if (empty($message)) {
return $message;

return '';
} elseif ($message instanceof NetteHtmlString || $message instanceof LatteHtmlString) {
$this->logMissingTranslation($message->__toString(), $domain, $locale);
return (string) $message; // what now?
Expand Down

0 comments on commit 21d848a

Please sign in to comment.