Skip to content

Commit

Permalink
FIX Handle non-array
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 6, 2023
1 parent b0fb2dc commit 5567509
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 @@ -331,7 +331,7 @@ private function removeEnglishStringsFromYamlTranslations(): void
// Remove any keys where the value is the same as the source english value
$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] ?? []) as $className) {
foreach (array_keys($contentYaml[$countryCode][$className]) as $key) {
$value = $contentYaml[$countryCode][$className][$key] ?? null;
$enValue = $enYaml['en'][$className][$key] ?? null;
Expand Down

0 comments on commit 5567509

Please sign in to comment.