Skip to content

Commit

Permalink
FIX Skip null values (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored May 7, 2024
1 parent cc2e876 commit 25f272f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,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) {
Expand Down

0 comments on commit 25f272f

Please sign in to comment.