mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
PHP 8 support
This commit is contained in:
@@ -86,7 +86,14 @@ class LocalizationService
|
||||
}
|
||||
else
|
||||
{
|
||||
return vsprintf($this->Translator->gettext($text), ...$placeholderValues);
|
||||
if (is_array(...$placeholderValues))
|
||||
{
|
||||
return vsprintf($this->Translator->gettext($text), ...$placeholderValues);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sprintf($this->Translator->gettext($text), array_shift($placeholderValues));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user