diff --git a/src/Translator.php b/src/Translator.php index 2bf1d15..4e169e6 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -167,7 +167,7 @@ protected function translatePlural( protected function getTranslation(?string $domain, ?string $context, string $original): ?array { if ($domain === null) { - $domain = $this->domain; + $domain = (string) $this->domain; } if ($context === null) { @@ -186,7 +186,7 @@ protected function getTranslation(?string $domain, ?string $context, string $ori protected function getPluralIndex(?string $domain, int $n, bool $fallback): int { if ($domain === null) { - $domain = $this->domain; + $domain = (string) $this->domain; } //Not loaded domain or translation, use a fallback