From d18c40f9357eff908cf9850b2060cf1dd1e104bb Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 7 May 2024 11:18:04 +1200 Subject: [PATCH] FIX Skip null values --- src/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Translator.php b/src/Translator.php index 372fe49..7d4e13d 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -332,7 +332,7 @@ private function removeEnglishStringsFromYamlTranslations(): void $contentYaml = Yaml::parse(file_get_contents($path)); foreach (array_keys($contentYaml) as $countryCode) { foreach (array_keys($contentYaml[$countryCode] ?? []) as $className) { - foreach (array_keys($contentYaml[$countryCode][$className]) as $key) { + foreach (array_keys($contentYaml[$countryCode][$className] ?? []) as $key) { $value = $contentYaml[$countryCode][$className][$key] ?? null; $enValue = $enYaml['en'][$className][$key] ?? null; if ($value === $enValue) {