From 8576df1a43f53876ad3c859968aab75da5b4a7d9 Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:07:10 +0100 Subject: [PATCH] fix: null as 2nd param is deprecated (#3801) --- framework/core/src/Locale/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Locale/Translator.php b/framework/core/src/Locale/Translator.php index 1919e8cd7..dce685a4c 100644 --- a/framework/core/src/Locale/Translator.php +++ b/framework/core/src/Locale/Translator.php @@ -62,7 +62,7 @@ class Translator extends BaseTranslator implements TranslatorContract { foreach ($catalogue->all() as $domain => $messages) { foreach ($messages as $id => $translation) { - if (preg_match(self::REFERENCE_REGEX, $translation, $matches)) { + if (! empty($translation) && preg_match(self::REFERENCE_REGEX, $translation, $matches)) { $catalogue->set($id, $this->getTranslation($catalogue, $id, $domain), $domain); } }