Skip to content
Permalink
Browse files

Fixed translations for empty value - PHP 5.6 fix.

  • Loading branch information...
bbankowski committed May 13, 2019
1 parent 41be76d commit de222448b2cf75fb9f3927fc8d17e0c6e8f92b40
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Ouzo/Core/Translator.php
@@ -24,7 +24,8 @@ public function __construct($language, $labels)
public function translate($key, $params = [])
{
$explodedKey = explode('.', $key);
$translation = Arrays::getNestedValue($this->_labels, $explodedKey) ?? $key;
$value = Arrays::getNestedValue($this->_labels, $explodedKey);
$translation = $value === null ? $key : $value;
return $this->localize(Strings::sprintAssoc($translation, $params));
}

0 comments on commit de22244

Please sign in to comment.
You can’t perform that action at this time.